| 1235 | } |
| 1236 | |
| 1237 | static int |
| 1238 | pfsync_in_tdb(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count) |
| 1239 | { |
| 1240 | int len = count * sizeof(struct pfsync_tdb); |
| 1241 | |
| 1242 | #if defined(IPSEC) |
| 1243 | struct pfsync_tdb *tp; |
| 1244 | struct mbuf *mp; |
| 1245 | int offp; |
| 1246 | int i; |
| 1247 | int s; |
| 1248 | |
| 1249 | mp = m_pulldown(m, offset, len, &offp); |
| 1250 | if (mp == NULL) { |
| 1251 | V_pfsyncstats.pfsyncs_badlen++; |
| 1252 | return (-1); |
| 1253 | } |
| 1254 | tp = (struct pfsync_tdb *)(mp->m_data + offp); |
| 1255 | |
| 1256 | for (i = 0; i < count; i++) |
| 1257 | pfsync_update_net_tdb(&tp[i]); |
| 1258 | #endif |
| 1259 | |
| 1260 | return (len); |
| 1261 | } |
| 1262 | |
| 1263 | #if defined(IPSEC) |
| 1264 | /* Update an in-kernel tdb. Silently fail if no tdb is found. */ |
nothing calls this directly
no test coverage detected