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

Function ng_ppp_crypt_recv

freebsd/netgraph/ng_ppp.c:1261–1283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1259}
1260
1261static int
1262ng_ppp_crypt_recv(node_p node, item_p item, uint16_t proto, uint16_t linkNum)
1263{
1264 const priv_p priv = NG_NODE_PRIVATE(node);
1265
1266 if (proto == PROT_CRYPTD) {
1267 if (priv->conf.enableDecryption &&
1268 priv->hooks[HOOK_INDEX_DECRYPT] != NULL) {
1269 int error;
1270
1271 /* Send packet out hook. */
1272 NG_FWD_ITEM_HOOK(error, item,
1273 priv->hooks[HOOK_INDEX_DECRYPT]);
1274 return (error);
1275 } else {
1276 /* Disabled protos MUST be silently discarded, but
1277 * unsupported MUST not. Let user-level decide this. */
1278 return (ng_ppp_bypass(node, item, proto, linkNum));
1279 }
1280 }
1281
1282 return (ng_ppp_comp_recv(node, item, proto, linkNum));
1283}
1284
1285/*
1286 * Receive data on a hook decrypt.

Callers 3

ng_ppp_mp_recvFunction · 0.85
ng_ppp_frag_processFunction · 0.85
ng_ppp_frag_checkstaleFunction · 0.85

Calls 2

ng_ppp_bypassFunction · 0.85
ng_ppp_comp_recvFunction · 0.85

Tested by

no test coverage detected