Re: svn commit: r242013 - head/sys/net
On Wednesday, October 24, 2012 3:05:53 pm Gleb Smirnoff wrote: On Wed, Oct 24, 2012 at 02:42:33PM -0400, John Baldwin wrote: J On Wednesday, October 24, 2012 2:33:44 pm Gleb Smirnoff wrote: J Author: glebius J Date: Wed Oct 24 18:33:44 2012 J New Revision: 242013 J URL: http://svn.freebsd.org/changeset/base/242013 J J Log: JFix fallout from r240071. If destination interface lookup fails, Jwe should broadcast a packet, not try to deliver it to NULL. J JReported by: rpaulo J J I wonder if this fixes the panic someone was reporting on net@ when removing J an interface from a bridge? I failed to find it on net@ or bugs@ in a timeframe after I committed if_transmit patch to bridge. Ah, it was on current@: Subject: panic possibly on on bridge member removal It definitely had a null ifnet pointer. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r242013 - head/sys/net
Author: glebius Date: Wed Oct 24 18:33:44 2012 New Revision: 242013 URL: http://svn.freebsd.org/changeset/base/242013 Log: Fix fallout from r240071. If destination interface lookup fails, we should broadcast a packet, not try to deliver it to NULL. Reported by: rpaulo Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c == --- head/sys/net/if_bridge.cWed Oct 24 18:32:37 2012(r242012) +++ head/sys/net/if_bridge.cWed Oct 24 18:33:44 2012(r242013) @@ -1988,20 +1988,19 @@ static int bridge_transmit(struct ifnet *ifp, struct mbuf *m) { struct bridge_softc *sc; + struct ether_header *eh; + struct ifnet *dst_if; int error = 0; sc = ifp-if_softc; ETHER_BPF_MTAP(ifp, m); + eh = mtod(m, struct ether_header *); BRIDGE_LOCK(sc); - if ((m-m_flags (M_BCAST|M_MCAST)) == 0) { - struct ether_header *eh; - struct ifnet *dst_if; - - eh = mtod(m, struct ether_header *); - dst_if = bridge_rtlookup(sc, eh-ether_dhost, 1); + if (((m-m_flags (M_BCAST|M_MCAST)) == 0) + (dst_if = bridge_rtlookup(sc, eh-ether_dhost, 1)) != NULL) { BRIDGE_UNLOCK(sc); error = bridge_enqueue(sc, dst_if, m); } else ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r242013 - head/sys/net
On Wednesday, October 24, 2012 2:33:44 pm Gleb Smirnoff wrote: Author: glebius Date: Wed Oct 24 18:33:44 2012 New Revision: 242013 URL: http://svn.freebsd.org/changeset/base/242013 Log: Fix fallout from r240071. If destination interface lookup fails, we should broadcast a packet, not try to deliver it to NULL. Reported by:rpaulo I wonder if this fixes the panic someone was reporting on net@ when removing an interface from a bridge? -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r242013 - head/sys/net
On Wed, Oct 24, 2012 at 02:42:33PM -0400, John Baldwin wrote: J On Wednesday, October 24, 2012 2:33:44 pm Gleb Smirnoff wrote: J Author: glebius J Date: Wed Oct 24 18:33:44 2012 J New Revision: 242013 J URL: http://svn.freebsd.org/changeset/base/242013 J J Log: JFix fallout from r240071. If destination interface lookup fails, Jwe should broadcast a packet, not try to deliver it to NULL. J JReported by: rpaulo J J I wonder if this fixes the panic someone was reporting on net@ when removing J an interface from a bridge? I failed to find it on net@ or bugs@ in a timeframe after I committed if_transmit patch to bridge. -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org