]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/ipaddr.h
Merge pull request #5793 from ton31337/fix/formatting_show_bgp_summary_failed
[mirror_frr.git] / lib / ipaddr.h
index ec08fc09a20edfbc612206f10fab790f52bba5e5..6bd614044c768d27d9979429b6ca39d2651e0712 100644 (file)
@@ -119,6 +119,12 @@ static inline void ipv4_mapped_ipv6_to_ipv4(struct in6_addr *in6,
        memcpy(in, (char *)in6 + 12, sizeof(struct in_addr));
 }
 
+static inline bool ipaddr_isset(struct ipaddr *ip)
+{
+       static struct ipaddr a = {};
+       return (0 == memcmp(&a, ip, sizeof(struct ipaddr)));
+}
+
 #ifdef __cplusplus
 }
 #endif