]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/xfrm/xfrm_user.c
Merge branch 'x86/debug' into core/urgent
[linux.git] / net / xfrm / xfrm_user.c
index 173477211e4027bd0810ba8833eb62f010733b64..b88ba45ff1ace6ff986cf214c9fd8d1b8730261d 100644 (file)
@@ -151,6 +151,25 @@ static int verify_newsa_info(struct xfrm_usersa_info *p,
 
        err = -EINVAL;
        switch (p->family) {
+       case AF_INET:
+               break;
+
+       case AF_INET6:
+#if IS_ENABLED(CONFIG_IPV6)
+               break;
+#else
+               err = -EAFNOSUPPORT;
+               goto out;
+#endif
+
+       default:
+               goto out;
+       }
+
+       switch (p->sel.family) {
+       case AF_UNSPEC:
+               break;
+
        case AF_INET:
                if (p->sel.prefixlen_d > 32 || p->sel.prefixlen_s > 32)
                        goto out;