> 
> Please post unified diffs, they are far easier to read for humans.
> 

    Sorry, here is the patch again.

        -- Qing


Index: route.c
===================================================================
RCS file: /home/ncvs/src/sys/net/route.c,v
retrieving revision 1.108
diff -u -r1.108 route.c
--- route.c     7 Jan 2005 01:45:35 -0000       1.108
+++ route.c     2 Jun 2005 17:49:28 -0000
@@ -743,8 +743,12 @@
                goto makeroute;

        case RTM_ADD:
-               if ((flags & RTF_GATEWAY) && !gateway)
-                       panic("rtrequest: GATEWAY but no gateway");
+                if (flags & RTF_GATEWAY) {
+                    if (!gateway)
+                        panic("rtrequest: GATEWAY but no gateway");
+                if (dst && (dst->sa_family != gateway->sa_family))
+                    senderr(EINVAL);
+                }

                if (info->rti_ifa == NULL && (error = rt_getifa(info)))
                        senderr(error);

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to