From f4e324372518cac4c4d2b8237ef1fa748160862a Mon Sep 17 00:00:00 2001 From: fengbojiang Date: Fri, 6 Sep 2024 12:59:47 +0800 Subject: [PATCH] Modify IPv4 vip addrs' broadaddr from `x.x.x.255` to `x.x.x.x`, same as vip addr, because vips' netmask only support `255.255.255.255` now. --- lib/ff_veth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ff_veth.c b/lib/ff_veth.c index 893e7c820..fe92337c5 100644 --- a/lib/ff_veth.c +++ b/lib/ff_veth.c @@ -466,8 +466,8 @@ ff_veth_setvaddr(struct ff_veth_softc *sc, struct ff_port_cfg *cfg) sa.sin_addr.s_addr = 0xFFFFFFFF; bcopy(&sa, &req.ifra_mask, sizeof(sa)); - // Only support 'x.x.x.255' broadaddr now - sa.sin_addr.s_addr = sc->vip[i] | 0xFF000000; + // Only support 'x.x.x.x' broadaddr now + sa.sin_addr.s_addr = sc->vip[i] /*| 0xFF000000*/; bcopy(&sa, &req.ifra_broadaddr, sizeof(sa)); ret = ifioctl(so, SIOCAIFADDR, (caddr_t)&req, curthread);