mirror of
https://passt.top/passt
synced 2025-06-15 11:55:34 +02:00
Make substructures for IPv4 and IPv6 specific context information
The context structure contains a batch of fields specific to IPv4 and to IPv6 connectivity. Split those out into a sub-structure. This allows the conf_ip4() and conf_ip6() functions, which take the entire context but touch very little of it, to be given more specific parameters, making it clearer what it affects without stepping through the code. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
5e12d23acb
commit
16f5586bb8
12 changed files with 232 additions and 212 deletions
2
arp.c
2
arp.c
|
@ -66,7 +66,7 @@ int arp(const struct ctx *c, const struct pool *p)
|
|||
return 1;
|
||||
|
||||
/* Don't resolve our own address, either. */
|
||||
if (!memcmp(am->tip, &c->addr4, sizeof(am->tip)))
|
||||
if (!memcmp(am->tip, &c->ip4.addr, sizeof(am->tip)))
|
||||
return 1;
|
||||
|
||||
ah->ar_op = htons(ARPOP_REPLY);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue