diff options
author | carlosg <carlosg> | 2003-03-12 00:17:52 +0000 |
---|---|---|
committer | carlosg <carlosg> | 2003-03-12 00:17:52 +0000 |
commit | 520988046709e0e006c84694c968aae2d66c5b69 (patch) | |
tree | 54b84fe75f0a78a8ac5c4ebb8e719e8ede57e5db /network-conf.in | |
parent | 01ae5b001c84e6b4f67e11b558023a43ccfd7088 (diff) |
2003-03-12 Carlos Garnacho Parro <garnacho@tuxerver.net>
* network-conf.in: now stores fine both IPv4 and IPv6
addresses in the /etc/hosts file
* callbacks.c: (filter_editable): removed these eye-hurting gotos.
(is_ip_text_ok): rewritten, this is against any structured
programming principle, and is eye-hurting too, but works for
IPv4, IPv6 and IPv4 embedded in IPv6
(get_address_section_value) added
* transfer.c: removed a g_print()
Diffstat (limited to 'network-conf.in')
-rwxr-xr-x | network-conf.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/network-conf.in b/network-conf.in index 1c06fcf..4fb9619 100755 --- a/network-conf.in +++ b/network-conf.in @@ -177,7 +177,8 @@ sub xml_parse_statichost else { &xst_report ("xml_unexp_tag", $elem); shift @$tree; } } - if ($ip =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/) + # common regexp for IPv4 and IPv6 + if ($ip =~ /([0-9]+[\.:])+/) { $$statichost{$ip} = \@alias; } |