Add a family argument to the ipconfig routing functions
authorSamuel Ortiz <sameo@linux.intel.com>
Wed, 28 Jul 2010 18:22:45 +0000 (20:22 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 29 Jul 2010 00:12:54 +0000 (02:12 +0200)
src/connman.h
src/ipconfig.c
src/rtnl.c

index 0dd87d2..b1d631a 100644 (file)
@@ -214,9 +214,9 @@ void __connman_ipconfig_newaddr(int index, int family, const char *label,
                                unsigned char prefixlen, const char *address);
 void __connman_ipconfig_deladdr(int index, int family, const char *label,
                                unsigned char prefixlen, const char *address);
-void __connman_ipconfig_newroute(int index, unsigned char scope,
+void __connman_ipconfig_newroute(int index, int family, unsigned char scope,
                                        const char *dst, const char *gateway);
-void __connman_ipconfig_delroute(int index, unsigned char scope,
+void __connman_ipconfig_delroute(int index, int family, unsigned char scope,
                                        const char *dst, const char *gateway);
 
 void __connman_ipconfig_foreach(void (*function) (int index, void *user_data),
index c557063..71b859a 100644 (file)
@@ -687,7 +687,7 @@ void __connman_ipconfig_deladdr(int index, int family, const char *label,
        }
 }
 
-void __connman_ipconfig_newroute(int index, unsigned char scope,
+void __connman_ipconfig_newroute(int index, int family, unsigned char scope,
                                        const char *dst, const char *gateway)
 {
        struct connman_ipdevice *ipdevice;
@@ -723,7 +723,7 @@ void __connman_ipconfig_newroute(int index, unsigned char scope,
                                                scope, scope2str(scope));
 }
 
-void __connman_ipconfig_delroute(int index, unsigned char scope,
+void __connman_ipconfig_delroute(int index, int family, unsigned char scope,
                                        const char *dst, const char *gateway)
 {
        struct connman_ipdevice *ipdevice;
index c67a0ed..d8ea5df 100644 (file)
@@ -648,7 +648,7 @@ static void process_newroute(unsigned char family, unsigned char scope,
        inet_ntop(family, &dst, dststr, sizeof(dststr));
        inet_ntop(family, &gateway, gatewaystr, sizeof(gatewaystr));
 
-       __connman_ipconfig_newroute(index, scope, dststr, gatewaystr);
+       __connman_ipconfig_newroute(index, family, scope, dststr, gatewaystr);
 
        /* skip host specific routes */
        if (scope != RT_SCOPE_UNIVERSE &&
@@ -682,7 +682,7 @@ static void process_delroute(unsigned char family, unsigned char scope,
        inet_ntop(family, &dst, dststr, sizeof(dststr));
        inet_ntop(family, &gateway, gatewaystr, sizeof(gatewaystr));
 
-       __connman_ipconfig_delroute(index, scope, dststr, gatewaystr);
+       __connman_ipconfig_delroute(index, family, scope, dststr, gatewaystr);
 
        /* skip host specific routes */
        if (scope != RT_SCOPE_UNIVERSE &&