| 1065 | } |
| 1066 | |
| 1067 | static int |
| 1068 | rip_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam, |
| 1069 | struct mbuf *control, struct thread *td) |
| 1070 | { |
| 1071 | struct inpcb *inp; |
| 1072 | u_long dst; |
| 1073 | |
| 1074 | inp = sotoinpcb(so); |
| 1075 | KASSERT(inp != NULL, ("rip_send: inp == NULL")); |
| 1076 | |
| 1077 | /* |
| 1078 | * Note: 'dst' reads below are unlocked. |
| 1079 | */ |
| 1080 | if (so->so_state & SS_ISCONNECTED) { |
| 1081 | if (nam) { |
| 1082 | m_freem(m); |
| 1083 | return (EISCONN); |
| 1084 | } |
| 1085 | dst = inp->inp_faddr.s_addr; /* Unlocked read. */ |
| 1086 | } else { |
| 1087 | if (nam == NULL) { |
| 1088 | m_freem(m); |
| 1089 | return (ENOTCONN); |
| 1090 | } |
| 1091 | dst = ((struct sockaddr_in *)nam)->sin_addr.s_addr; |
| 1092 | } |
| 1093 | return (rip_output(m, so, dst)); |
| 1094 | } |
| 1095 | #endif /* INET */ |
| 1096 | |
| 1097 | static int |
nothing calls this directly
no test coverage detected