Skip to content

Commit

Permalink
babymdd support in startup scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
keiichi committed Mar 1, 2005
1 parent 46946dc commit 1709815
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 14 deletions.
16 changes: 11 additions & 5 deletions freebsd4/etc/rc.mobileip6
@@ -1,5 +1,5 @@
#! /bin/sh -x
# $Id: rc.mobileip6,v 1.12 2005/01/26 08:27:06 keiichi Exp $
# $Id: rc.mobileip6,v 1.13 2005/03/01 18:00:23 keiichi Exp $

# Mobile IPv6 startup

Expand All @@ -24,6 +24,10 @@ mobileip6_pass2() {
;;
esac

if [ -z ${mdd_program} ]; then
mdd_program=babymdd
fi

case ${ipv6_mobile_nodetype} in
[Mm][Oo][Bb][Ii][Ll][Ee]_[Nn][Oo][Dd][Ee])
# setup SPD/SA
Expand All @@ -40,10 +44,12 @@ mobileip6_pass2() {

sysctl net.inet6.ip6.accept_rtadv=1
echo -n ' mnd'
mnd -n -i mip0
echo -n ' mdd'
mdd -n
# newmdd -c /etc/mdd.conf fxp0
echo -n ' ${mdd_program}'
for mip_interface in ${ipv6_mobile_virtual_home_interfaces:=mip0}
do
mnd -n -i ${mip_interface}
${mdd_program} -h ${mip_interface}
done
echo -n ' cnd'
cnd -n
echo -n ' rtsold'
Expand Down
17 changes: 12 additions & 5 deletions freebsd5/etc/rc.d/network_ipv6_mobile
Expand Up @@ -43,8 +43,8 @@ network_ipv6_mobile_start()
echo 'Doing Mobile IPv6 network setup:'

if ! ${SYSCTL_N} net.inet6.mip6.debug 2> /dev/null; then
echo 'No MIP6 kernel'
return
echo 'No MIP6 kernel'
return
fi

case ${ipv6_mobile_debug_enable} in
Expand All @@ -65,6 +65,10 @@ network_ipv6_mobile_start()
;;
esac

if [ -z ${mdd_program} ]; then
mdd_program=babymdd
fi

case ${ipv6_mobile_nodetype} in
[Mm][Oo][Bb][Ii][Ll][Ee]_[Nn][Oo][Dd][Ee])
${SYSCTL_W} net.inet6.ip6.accept_rtadv=1
Expand All @@ -81,9 +85,12 @@ network_ipv6_mobile_start()
fi

echo -n ' mnd'
mnd -n -i mip0
echo -n ' mdd'
mdd -n
echo -n " ${mdd_program}"
for mip_interface in ${ipv6_mobile_virtual_home_interfaces:=mip0}
do
mnd -n -i ${mip_interface}
${mdd_program} -h ${mip_interface}
done
echo -n ' cnd'
cnd -n
echo -n ' rtsold'
Expand Down
15 changes: 11 additions & 4 deletions netbsd/etc/rc.d/mobileip6
@@ -1,5 +1,5 @@
#!/bin/sh
# $Id: mobileip6,v 1.5 2004/12/09 02:19:30 t-momose Exp $
# $Id: mobileip6,v 1.6 2005/03/01 18:00:23 keiichi Exp $

# REQUIRE: network
# PROVIDE: mobileip6
Expand Down Expand Up @@ -34,6 +34,10 @@ mobileip6_start()
;;
esac

if [ -z ${mdd_program} ]; then
mdd_program=babymdd
fi

case ${ipv6_mobile_nodetype} in
[Mm][Oo][Bb][Ii][Ll][Ee]_[Nn][Oo][Dd][Ee])
# setup SPD/SA
Expand All @@ -49,9 +53,12 @@ mobileip6_start()
fi

echo -n ' mnd'
mnd -n -i mip0
echo -n ' mdd'
mdd -n
echo -n " ${mdd_program}"
for mip_interface in ${ipv6_mobile_virtual_home_interfaces:=mip0}
do
mnd -n -i ${mip_interface}
${mdd_program} -h ${mip_interface}
done
echo -n ' rtsold'
sysctl -w net.inet6.ip6.accept_rtadv=1
rtsold -a -m
Expand Down

0 comments on commit 1709815

Please sign in to comment.