diff options
author | Steven Barth <cyrus@openwrt.org> | 2015-04-14 08:31:53 +0000 |
---|---|---|
committer | Steven Barth <cyrus@openwrt.org> | 2015-04-14 08:31:53 +0000 |
commit | 7e5bf40cac5234f63d0f97d8d9c7ebe8b6d60fcc (patch) | |
tree | 58876323a24bc25d0b2144c1c4f84b6173194d76 /package/network/ipv6/odhcp6c/files | |
parent | c99c9f875eeb73448fe8951d16409be5a2dda076 (diff) | |
download | upstream-7e5bf40cac5234f63d0f97d8d9c7ebe8b6d60fcc.tar.gz upstream-7e5bf40cac5234f63d0f97d8d9c7ebe8b6d60fcc.tar.bz2 upstream-7e5bf40cac5234f63d0f97d8d9c7ebe8b6d60fcc.zip |
odhcpd: avoid illegal memory access in some corner cases
Signed-off-by: Steven Barth <steven@midlink.org>
SVN-Revision: 45428
Diffstat (limited to 'package/network/ipv6/odhcp6c/files')
-rwxr-xr-x | package/network/ipv6/odhcp6c/files/dhcpv6.script | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script index 8cfa929002..be74b01e4e 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.script +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script @@ -20,6 +20,14 @@ setup_interface () { proto_add_dns_server "$dns" done + for radomain in $RA_DOMAINS; do + local duplicate=0 + for domain in $DOMAINS; do + [ "$radomain" = "$domain" ] && duplicate=1 + done + [ "$duplicate" = 0 ] && DOMAINS="$DOMAINS $radomain" + done + for domain in $DOMAINS; do proto_add_dns_search "$domain" done |