X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=interfaces.h;h=06b0b8571db0a753d02796d741c8e46e4bcde19a;hb=2c19e019cbc7f545a55a02a3476a1abb5fc4fe86;hp=b9591af45e020d9ac0683b1e26be4d163cee2e48;hpb=83cad190740ab8312cf2ea953c1bf9dee2e965bf;p=debian%2Fsudo diff --git a/interfaces.h b/interfaces.h index b9591af..06b0b85 100644 --- a/interfaces.h +++ b/interfaces.h @@ -22,23 +22,23 @@ #ifndef _SUDO_INTERFACES_H #define _SUDO_INTERFACES_H +/* + * Union to hold either strucr in_addr or in6_add + */ +union sudo_in_addr_un { + struct in_addr ip4; +#ifdef HAVE_IN6_ADDR + struct in6_addr ip6; +#endif +}; + /* * IP address and netmask pairs for checking against local interfaces. */ struct interface { int family; /* AF_INET or AF_INET6 */ - union { - struct in_addr ip4; -#ifdef HAVE_IN6_ADDR - struct in6_addr ip6; -#endif - } addr; - union { - struct in_addr ip4; -#ifdef HAVE_IN6_ADDR - struct in6_addr ip6; -#endif - } netmask; + union sudo_in_addr_un addr; + union sudo_in_addr_un netmask; }; /*