MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pfsync_in_tdb

Function pfsync_in_tdb

freebsd/netpfil/pf/if_pfsync.c:1237–1261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1235}
1236
1237static int
1238pfsync_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. */

Callers

nothing calls this directly

Calls 2

m_pulldownFunction · 0.85
pfsync_update_net_tdbFunction · 0.85

Tested by

no test coverage detected