arp_rtrequest() panich & patch for comments

From: Iasen Kostov (tbyte_at_OTEL.net)
Date: 10/25/04

  • Next message: Iasen Kostov: "Re: arp_rtrequest() panich & patch for comments"
    Date: Mon, 25 Oct 2004 19:12:18 +0300
    To: freebsd-net@freebsd.org
    
    

    The problem is that there is a route in zebra's conf like this "ip route
    192.168.100.0/24 tun0" and when zebra first starts there is still not
    tun0. In the moment of setting up the tun0 interface (creating or
    associating IP) it looks like zebra tries to add this route which until
    this moment is inactive. And then *POOF* kernel panic in arp_rtrequest()
    at 180.
    This is the segment of code:

                    if ((rt->rt_flags & RTF_HOST) == 0 &&
                        SIN(rt_mask(rt))->sin_addr.s_addr != 0xffffffff)
                            rt->rt_flags |= RTF_CLONING;

    I saw that rtrequest1() does checks for rt_mask(rt) != NULL, so why
    arp_rtrequest() does not ?
    Then I've changed it like this:

                    if ((rt->rt_flags & RTF_HOST) == 0 &&
    + rt_mask(rt) != NULL &&
                        SIN(rt_mask(rt))->sin_addr.s_addr != 0xffffffff)
                            rt->rt_flags |= RTF_CLONING;

    and the panic disappeared but this is what the kernel complains in that
    case :

    arp_rtrequest: bad gateway 192.168.100.0 (!AF_LINK)

    and adds a nice route like this:

    192.168.100 0.0.0.0 U1 0 0 vlan5

    There is vlan5 and route :

    192.168.96/20 link#6 UC 0 0 vlan5

    so it clones it or ... I don't really know what's happening :) but
    possibly is not right. And if the interface tun0 exists
    everything is as it should be:

    192.168.100 tun0 U1 0 0 tun0

    but whatever is the case - user space program should not be able to
    panic the kernel so easy ...
    I don't know where really the bug is - in arp_rtrequest() or somewhere
    in the pipe that at the end calls arp_rtrequest().

        Regards.

    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Iasen Kostov: "Re: arp_rtrequest() panich & patch for comments"

    Relevant Pages

    • IPFW2 verrevpath issue (IPv4 TCP, fresh kernel)
      ... I seem to have difficulties with verrevpath in IPFW2 (current kernel, ... tun0 is a PPPoE ... I have a default route via 217.5.*.* gateway on ...
      (freebsd-current)
    • No pf....route exists
      ... It looks like I have a route set and pfctl should invoke ... tcpdump is not collecting any data regarding the tun0 interface. ...
      (comp.unix.bsd.openbsd.misc)
    • Debian-stable:vpnc and pptp
      ... to establish a tunnel to my VPN host (i.e. ... I can login and tun0 shows up, ... change the default route ... I am not a real network expert, ...
      (comp.dcom.vpn)
    • Re: How to specify/detect an NIC when using two or more NIC
      ... >Kernel IP Routentabelle ... >- you can see that there is no default route (and that i am working on ... >is that the packets to hosts inside our network will take the ways i ... 12:36:15.850000 arp who-has 4.3.2.11 tell 192.168.151.12 ...
      (comp.os.linux.networking)
    • Possible breakage of RELENG_4_8 kernels with security fix for FreeBSD-SA-03:14.arp
      ... Establishing multiplexed-mode data connection ... The default route was not set properly during boot. ... I am unsure if that kernel was running or awaiting a reload. ... Sep 24 01:00:01 two /kernel: arpresolval network ...
      (freebsd-stable)