aboutgitcodebugslistschat
path: root/dhcp.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-09-07 11:19:57 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-09-09 15:40:04 +0200
commitec2b58ea4dc45079470efedaa632da25031d5adc (patch)
tree8590159cb26a4db0fc943d657093f6e8bbbe6345 /dhcp.c
parent8e9333616ac3dd37dfb2261f08dd0b16018d0686 (diff)
downloadpasst-ec2b58ea4dc45079470efedaa632da25031d5adc.tar
passt-ec2b58ea4dc45079470efedaa632da25031d5adc.tar.gz
passt-ec2b58ea4dc45079470efedaa632da25031d5adc.tar.bz2
passt-ec2b58ea4dc45079470efedaa632da25031d5adc.tar.lz
passt-ec2b58ea4dc45079470efedaa632da25031d5adc.tar.xz
passt-ec2b58ea4dc45079470efedaa632da25031d5adc.tar.zst
passt-ec2b58ea4dc45079470efedaa632da25031d5adc.zip
conf, dhcp, ndp: Fix message about default MTU, make NDP consistent
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'dhcp.c')
-rw-r--r--dhcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/dhcp.c b/dhcp.c
index 4969eec..24194ee 100644
--- a/dhcp.c
+++ b/dhcp.c
@@ -49,7 +49,6 @@ struct opt {
static struct opt opts[255] = {
[1] = { 0, 4, { 0 }, 0, { 0 }, }, /* Mask */
[3] = { 0, 4, { 0 }, 0, { 0 }, }, /* Router */
- [26] = { 0, 2, { 0xff, 0xf0 }, 0, { 0 }, }, /* MTU */
[51] = { 0, 4, { 0xff, 0xff, 0xff, 0xff }, 0, { 0 }, }, /* Lease time */
[53] = { 0, 1, { 0 }, 0, { 0 }, }, /* Type */
#define DHCPDISCOVER 1
@@ -319,7 +318,7 @@ int dhcp(struct ctx *c, struct ethhdr *eh, size_t len)
*(unsigned long *)&opts[121].s[10] = c->gw4;
}
- if (c->mtu) {
+ if (c->mtu != -1) {
opts[26].slen = 2;
opts[26].s[0] = c->mtu / 256;
opts[26].s[1] = c->mtu % 256;