From 7cfee5944ce40a5af8fc6e2bc2a1e0f7f7c68012 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 12 May 2012 23:27:49 +0000 Subject: [PATCH] Don't let Solaris IPMP devices appear as Ethernet. --- libdnet-stripped/src/intf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libdnet-stripped/src/intf.c b/libdnet-stripped/src/intf.c index 8e95af4b7..0c07c5787 100644 --- a/libdnet-stripped/src/intf.c +++ b/libdnet-stripped/src/intf.c @@ -108,7 +108,7 @@ intf_flags_to_iff(u_short flags, int iff) } static u_int -intf_iff_to_flags(int iff) +intf_iff_to_flags(uint64_t iff) { u_int n = 0; @@ -124,6 +124,12 @@ intf_iff_to_flags(int iff) n |= INTF_FLAG_BROADCAST; if (iff & IFF_MULTICAST) n |= INTF_FLAG_MULTICAST; +#ifdef IFF_IPMP + /* Unset the BROADCAST and MULTICAST flags from Solaris IPMP interfaces, + * otherwise _intf_set_type will think they are INTF_TYPE_ETH. */ + if (iff & IFF_IPMP) + n &= ~(INTF_FLAG_BROADCAST | INTF_FLAG_MULTICAST); +#endif return (n); }