diff options
Diffstat (limited to 'sys/netinet/ip_mroute.c')
-rw-r--r-- | sys/netinet/ip_mroute.c | 50 |
1 files changed, 19 insertions, 31 deletions
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 1d165f5..d1122b1 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -2145,16 +2145,6 @@ rsvp_input(m, off, proto) return; } - /* If the old-style non-vif-associated socket is set, then use - * it and ignore the new ones. - */ - if (ip_rsvpd != NULL) { - if (rsvpdebug) - printf("rsvp_input: Sending packet up old-style socket\n"); - rip_input(m, off, proto); /* xxx */ - return; - } - s = splnet(); if (rsvpdebug) @@ -2167,31 +2157,29 @@ rsvp_input(m, off, proto) ifp = m->m_pkthdr.rcvif; /* Find which vif the packet arrived on. */ - for (vifi = 0; vifi < numvifs; vifi++) { + for (vifi = 0; vifi < numvifs; vifi++) if (viftable[vifi].v_ifp == ifp) - break; - } - - if (vifi == numvifs) { - /* Can't find vif packet arrived on. Drop packet. */ - if (rsvpdebug) - printf("rsvp_input: Can't find vif for packet...dropping it.\n"); - m_freem(m); - splx(s); - return; - } - - if (rsvpdebug) - printf("rsvp_input: check socket\n"); + break; - if (viftable[vifi].v_rsvpd == NULL) { - /* drop packet, since there is no specific socket for this - * interface */ + if (vifi == numvifs || viftable[vifi].v_rsvpd == NULL) { + /* + * If the old-style non-vif-associated socket is set, + * then use it. Otherwise, drop packet since there + * is no specific socket for this vif. + */ + if (ip_rsvpd != NULL) { if (rsvpdebug) - printf("rsvp_input: No socket defined for vif %d\n",vifi); + printf("rsvp_input: Sending packet up old-style socket\n"); + rip_input(m, off, proto); /* xxx */ + } else { + if (rsvpdebug && vifi == numvifs) + printf("rsvp_input: Can't find vif for packet.\n"); + else if (rsvpdebug && viftable[vifi].v_rsvpd == NULL) + printf("rsvp_input: No socket defined for vif %d\n",vifi); m_freem(m); - splx(s); - return; + } + splx(s); + return; } rsvp_src.sin_addr = ip->ip_src; |