]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/rule_netlink.c
zebra: ZEBRA_[ERR|WARN] -> EC_ZEBRA
[mirror_frr.git] / zebra / rule_netlink.c
index c7a8517e17c73c0ea496db700a5df9db85d24960..518d81dd6ebb29367c1eb2683d4493c82da52502 100644 (file)
@@ -40,6 +40,7 @@
 #include "zebra/kernel_netlink.h"
 #include "zebra/rule_netlink.h"
 #include "zebra/zebra_pbr.h"
+#include "zebra/zebra_errors.h"
 
 /* definitions */
 
@@ -204,8 +205,13 @@ int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
        }
 
        frh = NLMSG_DATA(h);
-       if (frh->family != AF_INET && frh->family != AF_INET6)
+       if (frh->family != AF_INET && frh->family != AF_INET6) {
+               flog_warn(
+                       EC_ZEBRA_NETLINK_INVALID_AF,
+                       "Invalid address family: %u received from kernel rule change: %u",
+                       frh->family, h->nlmsg_type);
                return 0;
+       }
        if (frh->action != FR_ACT_TO_TBL)
                return 0;