| 1110 | } |
| 1111 | |
| 1112 | static int |
| 1113 | pfsync_in_del(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count) |
| 1114 | { |
| 1115 | struct mbuf *mp; |
| 1116 | struct pfsync_state *sa, *sp; |
| 1117 | struct pf_state *st; |
| 1118 | int len = count * sizeof(*sp); |
| 1119 | int offp, i; |
| 1120 | |
| 1121 | mp = m_pulldown(m, offset, len, &offp); |
| 1122 | if (mp == NULL) { |
| 1123 | V_pfsyncstats.pfsyncs_badlen++; |
| 1124 | return (-1); |
| 1125 | } |
| 1126 | sa = (struct pfsync_state *)(mp->m_data + offp); |
| 1127 | |
| 1128 | for (i = 0; i < count; i++) { |
| 1129 | sp = &sa[i]; |
| 1130 | |
| 1131 | st = pf_find_state_byid(sp->id, sp->creatorid); |
| 1132 | if (st == NULL) { |
| 1133 | V_pfsyncstats.pfsyncs_badstate++; |
| 1134 | continue; |
| 1135 | } |
| 1136 | st->state_flags |= PFSTATE_NOSYNC; |
| 1137 | pf_unlink_state(st, PF_ENTER_LOCKED); |
| 1138 | } |
| 1139 | |
| 1140 | return (len); |
| 1141 | } |
| 1142 | |
| 1143 | static int |
| 1144 | pfsync_in_del_c(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count) |
nothing calls this directly
no test coverage detected