Date: Wed, 24 Oct 2012 09:53:34 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241992 - in stable/9: sys/netinet usr.sbin/arp Message-ID: <201210240953.q9O9rYJd088464@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Wed Oct 24 09:53:34 2012 New Revision: 241992 URL: http://svn.freebsd.org/changeset/base/241992 Log: Merge 240073 from head: Provide a sysctl switch that allows to install ARP entries with multicast bit set. FreeBSD refuses to install such entries since 9.0, and this broke installations running Microsoft NLB, which are violating standards. Tested by: Tarasov Oleg <oleg_tarasov sg-tea.com> Modified: stable/9/sys/netinet/if_ether.c stable/9/usr.sbin/arp/arp.4 Directory Properties: stable/9/sys/ (props changed) stable/9/usr.sbin/arp/ (props changed) Modified: stable/9/sys/netinet/if_ether.c ============================================================================== --- stable/9/sys/netinet/if_ether.c Wed Oct 24 09:46:52 2012 (r241991) +++ stable/9/sys/netinet/if_ether.c Wed Oct 24 09:53:34 2012 (r241992) @@ -481,6 +481,7 @@ arpintr(struct mbuf *m) static int log_arp_wrong_iface = 1; static int log_arp_movements = 1; static int log_arp_permanent_modify = 1; +static int allow_multicast = 0; SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_wrong_iface, CTLFLAG_RW, &log_arp_wrong_iface, 0, @@ -491,7 +492,8 @@ SYSCTL_INT(_net_link_ether_inet, OID_AUT SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_permanent_modify, CTLFLAG_RW, &log_arp_permanent_modify, 0, "log arp replies from MACs different than the one in the permanent arp entry"); - +SYSCTL_INT(_net_link_ether_inet, OID_AUTO, allow_multicast, CTLFLAG_RW, + &allow_multicast, 0, "accept multicast addresses"); static void in_arpinput(struct mbuf *m) @@ -536,8 +538,8 @@ in_arpinput(struct mbuf *m) return; } - if (ETHER_IS_MULTICAST(ar_sha(ah))) { - log(LOG_NOTICE, "in_arp: %*D is multicast\n", + if (allow_multicast == 0 && ETHER_IS_MULTICAST(ar_sha(ah))) { + log(LOG_NOTICE, "arp: %*D is multicast\n", ifp->if_addrlen, (u_char *)ar_sha(ah), ":"); return; } Modified: stable/9/usr.sbin/arp/arp.4 ============================================================================== --- stable/9/usr.sbin/arp/arp.4 Wed Oct 24 09:46:52 2012 (r241991) +++ stable/9/usr.sbin/arp/arp.4 Wed Oct 24 09:53:34 2012 (r241992) @@ -120,6 +120,12 @@ of the .Xr sysctl 3 MIB. .Bl -tag -width "log_arp_permanent_modify" +.It Va allow_multicast +Should the kernel install ARP entries with multicast bit set in +the hardware address. +Installing such entries is RFC 1812 violation, but some prorietary +load balancing techniques require routers on network to do so. +Turned off by default. .It Va log_arp_movements Should the kernel log movements of IP addresses from one hardware address to an other. @@ -203,6 +209,11 @@ entry in the local ARP table. This error will only be logged if the sysctl .Va net.link.ether.inet.log_arp_permanent_modify is set to 1, which is the system's default behaviour. +.It "arp: %x:%x:%x:%x:%x:%x is multicast" +Kernel refused to install an entry with multicast hardware address. +If you really want such addresses being installed, set the sysctl +.Va net.link.ether.inet.allow_multicast +to a positive value. .El .Sh SEE ALSO .Xr inet 4 ,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210240953.q9O9rYJd088464>