| 1141 | } |
| 1142 | |
| 1143 | static int |
| 1144 | pfsync_in_del_c(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count) |
| 1145 | { |
| 1146 | struct mbuf *mp; |
| 1147 | struct pfsync_del_c *sa, *sp; |
| 1148 | struct pf_state *st; |
| 1149 | int len = count * sizeof(*sp); |
| 1150 | int offp, i; |
| 1151 | |
| 1152 | mp = m_pulldown(m, offset, len, &offp); |
| 1153 | if (mp == NULL) { |
| 1154 | V_pfsyncstats.pfsyncs_badlen++; |
| 1155 | return (-1); |
| 1156 | } |
| 1157 | sa = (struct pfsync_del_c *)(mp->m_data + offp); |
| 1158 | |
| 1159 | for (i = 0; i < count; i++) { |
| 1160 | sp = &sa[i]; |
| 1161 | |
| 1162 | st = pf_find_state_byid(sp->id, sp->creatorid); |
| 1163 | if (st == NULL) { |
| 1164 | V_pfsyncstats.pfsyncs_badstate++; |
| 1165 | continue; |
| 1166 | } |
| 1167 | |
| 1168 | st->state_flags |= PFSTATE_NOSYNC; |
| 1169 | pf_unlink_state(st, PF_ENTER_LOCKED); |
| 1170 | } |
| 1171 | |
| 1172 | return (len); |
| 1173 | } |
| 1174 | |
| 1175 | static int |
| 1176 | pfsync_in_bus(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count) |
nothing calls this directly
no test coverage detected