| 911 | } |
| 912 | |
| 913 | static void |
| 914 | rip_detach(struct socket *so) |
| 915 | { |
| 916 | struct inpcb *inp; |
| 917 | |
| 918 | inp = sotoinpcb(so); |
| 919 | KASSERT(inp != NULL, ("rip_detach: inp == NULL")); |
| 920 | KASSERT(inp->inp_faddr.s_addr == INADDR_ANY, |
| 921 | ("rip_detach: not closed")); |
| 922 | |
| 923 | INP_INFO_WLOCK(&V_ripcbinfo); |
| 924 | INP_WLOCK(inp); |
| 925 | rip_delhash(inp); |
| 926 | if (so == V_ip_mrouter && ip_mrouter_done) |
| 927 | ip_mrouter_done(); |
| 928 | if (ip_rsvp_force_done) |
| 929 | ip_rsvp_force_done(so); |
| 930 | if (so == V_ip_rsvpd) |
| 931 | ip_rsvp_done(); |
| 932 | in_pcbdetach(inp); |
| 933 | in_pcbfree(inp); |
| 934 | INP_INFO_WUNLOCK(&V_ripcbinfo); |
| 935 | } |
| 936 | |
| 937 | static void |
| 938 | rip_dodisconnect(struct socket *so, struct inpcb *inp) |
nothing calls this directly
no test coverage detected