]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - ip/rtm_map.c
Merge branch 'iproute2-master' into iproute2-next
[mirror_iproute2.git] / ip / rtm_map.c
index 21e818b4adca795f8eca27f64d63274cc8493778..76f937805bb4210681d5c7ffe5be6cf5e3bb2e9a 100644 (file)
@@ -13,7 +13,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <syslog.h>
 #include <fcntl.h>
 #include <string.h>
 #include <sys/socket.h>
@@ -93,7 +92,7 @@ int rtnl_rtntype_a2n(int *id, char *arg)
        return 0;
 }
 
-int get_rt_realms(__u32 *realms, char *arg)
+static int get_rt_realms(__u32 *realms, char *arg)
 {
        __u32 realm = 0;
        char *p = strchr(arg, '/');
@@ -114,3 +113,11 @@ int get_rt_realms(__u32 *realms, char *arg)
        *realms |= realm;
        return 0;
 }
+
+int get_rt_realms_or_raw(__u32 *realms, char *arg)
+{
+       if (!get_rt_realms(realms, arg))
+               return 0;
+
+       return get_unsigned(realms, arg, 0);
+}