ifupdown: add manual method for IPv6. Closes bug 2497.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
ec07420eb9
commit
66cb7bed33
@ -329,9 +329,12 @@ static int execute(const char *command, struct interface_defn_t *ifd, execfn *ex
|
|||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
#endif /* FEATURE_IFUPDOWN_IPV4 || FEATURE_IFUPDOWN_IPV6 */
|
||||||
|
|
||||||
|
|
||||||
#if ENABLE_FEATURE_IFUPDOWN_IPV6
|
#if ENABLE_FEATURE_IFUPDOWN_IPV6
|
||||||
|
|
||||||
static int FAST_FUNC loopback_up6(struct interface_defn_t *ifd, execfn *exec)
|
static int FAST_FUNC loopback_up6(struct interface_defn_t *ifd, execfn *exec)
|
||||||
{
|
{
|
||||||
# if ENABLE_FEATURE_IFUPDOWN_IP
|
# if ENABLE_FEATURE_IFUPDOWN_IP
|
||||||
@ -353,6 +356,11 @@ static int FAST_FUNC loopback_down6(struct interface_defn_t *ifd, execfn *exec)
|
|||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int FAST_FUNC manual_up_down6(struct interface_defn_t *ifd UNUSED_PARAM, execfn *exec UNUSED_PARAM)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static int FAST_FUNC static_up6(struct interface_defn_t *ifd, execfn *exec)
|
static int FAST_FUNC static_up6(struct interface_defn_t *ifd, execfn *exec)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
@ -401,6 +409,7 @@ static const struct method_t methods6[] = {
|
|||||||
{ "v4tunnel" , v4tunnel_up , v4tunnel_down , },
|
{ "v4tunnel" , v4tunnel_up , v4tunnel_down , },
|
||||||
# endif
|
# endif
|
||||||
{ "static" , static_up6 , static_down6 , },
|
{ "static" , static_up6 , static_down6 , },
|
||||||
|
{ "manual" , manual_up_down6 , manual_up_down6 , },
|
||||||
{ "loopback" , loopback_up6 , loopback_down6 , },
|
{ "loopback" , loopback_up6 , loopback_down6 , },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -409,9 +418,12 @@ static const struct address_family_t addr_inet6 = {
|
|||||||
ARRAY_SIZE(methods6),
|
ARRAY_SIZE(methods6),
|
||||||
methods6
|
methods6
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FEATURE_IFUPDOWN_IPV6 */
|
#endif /* FEATURE_IFUPDOWN_IPV6 */
|
||||||
|
|
||||||
|
|
||||||
#if ENABLE_FEATURE_IFUPDOWN_IPV4
|
#if ENABLE_FEATURE_IFUPDOWN_IPV4
|
||||||
|
|
||||||
static int FAST_FUNC loopback_up(struct interface_defn_t *ifd, execfn *exec)
|
static int FAST_FUNC loopback_up(struct interface_defn_t *ifd, execfn *exec)
|
||||||
{
|
{
|
||||||
# if ENABLE_FEATURE_IFUPDOWN_IP
|
# if ENABLE_FEATURE_IFUPDOWN_IP
|
||||||
@ -500,7 +512,7 @@ static const struct dhcp_client_t ext_dhcp_clients[] = {
|
|||||||
"kill `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null",
|
"kill `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#endif /* ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCPC */
|
# endif /* FEATURE_IFUPDOWN_EXTERNAL_DHCPC */
|
||||||
|
|
||||||
# if ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCP
|
# if ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCP
|
||||||
static int FAST_FUNC dhcp_up(struct interface_defn_t *ifd, execfn *exec)
|
static int FAST_FUNC dhcp_up(struct interface_defn_t *ifd, execfn *exec)
|
||||||
@ -644,7 +656,8 @@ static const struct address_family_t addr_inet = {
|
|||||||
methods
|
methods
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* if ENABLE_FEATURE_IFUPDOWN_IPV4 */
|
#endif /* FEATURE_IFUPDOWN_IPV4 */
|
||||||
|
|
||||||
|
|
||||||
/* Returns pointer to the next word, or NULL.
|
/* Returns pointer to the next word, or NULL.
|
||||||
* In 1st case, advances *buf to the word after this one.
|
* In 1st case, advances *buf to the word after this one.
|
||||||
|
Loading…
Reference in New Issue
Block a user