1
0
Fork 0
mirror of https://passt.top/passt synced 2025-06-16 04:15:34 +02:00

passt: Run in background, add message logging with severities

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-03-18 07:49:08 +01:00
parent 8bfcc9208c
commit 48ca38c606
6 changed files with 109 additions and 71 deletions

4
ndp.c
View file

@ -61,7 +61,7 @@ int ndp(struct ctx *c, struct ethhdr *eh, size_t len)
ihr = (struct icmp6hdr *)(ip6hr + 1);
if (ih->icmp6_type == NS) {
fprintf(stderr, "NDP: received NS, sending NA\n");
info("NDP: received NS, sending NA");
ihr->icmp6_type = NA;
ihr->icmp6_code = 0;
ihr->icmp6_router = 1;
@ -76,7 +76,7 @@ int ndp(struct ctx *c, struct ethhdr *eh, size_t len)
memcpy(p, c->mac, ETH_ALEN);
p += 6;
} else if (ih->icmp6_type == RS) {
fprintf(stderr, "NDP: received RS, sending RA\n");
info("NDP: received RS, sending RA");
ihr->icmp6_type = RA;
ihr->icmp6_code = 0;
ihr->icmp6_rt_lifetime = htons(3600);