aboutgitcodebugslistschat
path: root/dhcp.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-03-18 07:49:08 +0100
committerStefano Brivio <sbrivio@redhat.com>2021-03-18 12:58:07 +0100
commit48ca38c6068bd15a94b1ecf2977d3f0160bbe63b (patch)
treeb15899a7dc87d400eabf56dcc67dc6f3b824addf /dhcp.c
parent8bfcc9208cf99a653b9235bbe28ad5eb6c2e6bf2 (diff)
downloadpasst-48ca38c6068bd15a94b1ecf2977d3f0160bbe63b.tar
passt-48ca38c6068bd15a94b1ecf2977d3f0160bbe63b.tar.gz
passt-48ca38c6068bd15a94b1ecf2977d3f0160bbe63b.tar.bz2
passt-48ca38c6068bd15a94b1ecf2977d3f0160bbe63b.tar.lz
passt-48ca38c6068bd15a94b1ecf2977d3f0160bbe63b.tar.xz
passt-48ca38c6068bd15a94b1ecf2977d3f0160bbe63b.tar.zst
passt-48ca38c6068bd15a94b1ecf2977d3f0160bbe63b.zip
passt: Run in background, add message logging with severities
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'dhcp.c')
-rw-r--r--dhcp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/dhcp.c b/dhcp.c
index d4a5261..ec06fc5 100644
--- a/dhcp.c
+++ b/dhcp.c
@@ -198,18 +198,18 @@ int dhcp(struct ctx *c, struct ethhdr *eh, size_t len)
}
if (opts[53].c[0] == DHCPDISCOVER) {
- fprintf(stderr, "DHCP: offer to discover");
+ info("DHCP: offer to discover");
opts[53].s[0] = DHCPOFFER;
} else if (opts[53].c[0] == DHCPREQUEST) {
- fprintf(stderr, "DHCP: ack to request");
+ info("DHCP: ack to request");
opts[53].s[0] = DHCPACK;
} else {
return -1;
}
- fprintf(stderr, " from %02x:%02x:%02x:%02x:%02x:%02x\n\n",
- m->chaddr[0], m->chaddr[1], m->chaddr[2],
- m->chaddr[3], m->chaddr[4], m->chaddr[5]);
+ info(" from %02x:%02x:%02x:%02x:%02x:%02x",
+ m->chaddr[0], m->chaddr[1], m->chaddr[2],
+ m->chaddr[3], m->chaddr[4], m->chaddr[5]);
m->yiaddr = c->addr4;
*(unsigned long *)opts[1].s = c->mask4;