Deleted Added
full compact
stf (197701) stf (197947)
1#!/bin/sh
1#!/bin/sh
2# $FreeBSD: head/etc/rc.d/stf 197701 2009-10-02 06:19:34Z hrs $
2# $FreeBSD: head/etc/rc.d/stf 197947 2009-10-10 22:17:03Z dougb $
3#
4
5# PROVIDE: stf
6# REQUIRE: netif routing
7# KEYWORD: nojail
8
9. /etc/rc.subr
10. /etc/network.subr

--- 37 unchanged lines hidden (view full) ---

48 ;;
49 esac
50 ;;
51 esac
52 echo "Configuring 6to4 tunnel interface: stf0."
53 ifconfig stf0 create >/dev/null 2>&1
54 ifconfig stf0 inet6 2002:${ipv4_in_hexformat}:${stf_interface_ipv6_slaid:-0}:${stf_interface_ipv6_ifid} \
55 prefixlen ${stf_prefixlen}
3#
4
5# PROVIDE: stf
6# REQUIRE: netif routing
7# KEYWORD: nojail
8
9. /etc/rc.subr
10. /etc/network.subr

--- 37 unchanged lines hidden (view full) ---

48 ;;
49 esac
50 ;;
51 esac
52 echo "Configuring 6to4 tunnel interface: stf0."
53 ifconfig stf0 create >/dev/null 2>&1
54 ifconfig stf0 inet6 2002:${ipv4_in_hexformat}:${stf_interface_ipv6_slaid:-0}:${stf_interface_ipv6_ifid} \
55 prefixlen ${stf_prefixlen}
56 if [ -z "${rc_quiet}" ]; then
57 /sbin/ifconfig stf0
58 fi
56 check_startmsgs && /sbin/ifconfig stf0
57
59 # disallow packets to malicious 6to4 prefix
60 route add -inet6 2002:e000:: -prefixlen 20 ::1 -reject
61 route add -inet6 2002:7f00:: -prefixlen 24 ::1 -reject
62 route add -inet6 2002:0000:: -prefixlen 24 ::1 -reject
63 route add -inet6 2002:ff00:: -prefixlen 24 ::1 -reject
64 ;;
65 esac
66}

--- 13 unchanged lines hidden ---
58 # disallow packets to malicious 6to4 prefix
59 route add -inet6 2002:e000:: -prefixlen 20 ::1 -reject
60 route add -inet6 2002:7f00:: -prefixlen 24 ::1 -reject
61 route add -inet6 2002:0000:: -prefixlen 24 ::1 -reject
62 route add -inet6 2002:ff00:: -prefixlen 24 ::1 -reject
63 ;;
64 esac
65}

--- 13 unchanged lines hidden ---