From: Linda K. <lin...@hp...> - 2011-03-13 20:36:17
|
Linda Knippers wrote: > Linda Knippers wrote: >> Paul Moore wrote: >>> your dog getting kicked apply.] >>> >>> Fix the IPv6 address calculations in the network tests' address filter >>> functions. >>> >>> Signed-off-by: Paul Moore <pau...@hp...> >>> --- >>> audit/network/addr_filter.bash | 26 ++++---------------------- >>> 1 files changed, 4 insertions(+), 22 deletions(-) >>> >>> diff --git a/audit/network/addr_filter.bash b/audit/network/addr_filter.bash >>> index cc8cf40..04e6ad3 100755 >>> --- a/audit/network/addr_filter.bash >>> +++ b/audit/network/addr_filter.bash >>> @@ -24,25 +24,9 @@ >>> # helper functions >>> # >>> >>> -function get_ipv6_prefix { >>> - if [[ -n $LBLNET_SVR_IPV6 ]]; then >>> - ip -f inet6 route show to match $LBLNET_SVR_IPV6 | \ >>> - grep -v default | cut -d'/' -f 1 >>> - elif [[ -n $LBLNET_PREFIX_IPV6 ]]; then >>> - echo $LBLNET_PREFIX_IPV6 | sed 's/:\/[0-9]*//;s/:0*/:/g;' >>> - else >>> - ip -o -f inet6 addr show scope global | \ >>> - awk 'BEGIN { FS = "[ \t]*|[ \t\\/]+" } { print $4 }' | \ >>> - awk 'BEGIN { FS = ":" } { print $1":"$2":"$3":"$4":" }' | \ >>> - head -n 1 >>> - fi >>> -} >>> - >>> function get_ipv6_iface { >>> - declare prefix=$(get_ipv6_prefix) >>> - ip -o -f inet6 addr show scope global | \ >>> - awk 'BEGIN { FS = "[ \t]*|[ \t\\/]+" } { print $2 }' | \ >>> - grep $prefix | head -n 1 >>> + ip -o -f inet6 addr show scope global to $LBLNET_PREFIX_IPV6 | \ >>> + head -n 1 | awk '{ print $2 }' >>> } >>> >>> function get_ipv4_addr { >>> @@ -51,10 +35,8 @@ function get_ipv4_addr { >>> } >>> >>> function get_ipv6_addr { >>> - declare prefix=$(get_ipv6_prefix) >>> - ip -o -f inet6 addr show scope global | \ >>> - awk 'BEGIN { FS = "[ \t]*|[ \t\\/]+" } { print $4 }' | \ >>> - grep $prefix | head -n 1 >>> + ip -o -f inet6 addr show scope global to $LBLNET_PREFIX_IPV6 | \ >>> + head -n 1 | awk '{ print $4 }' I'm running a test with this: @@ -52,10 +36,8 @@ function get_ipv4_addr { } function get_ipv6_addr { - declare prefix=$(get_ipv6_prefix) - ip -o -f inet6 addr show scope global | \ - awk 'BEGIN { FS = "[ \t]*|[ \t\\/]+" } { print $4 }' | \ - grep $prefix | head -n 1 + ip -o -f inet6 addr show scope global to $LBLNET_PREFIX_IPV6 | \ + head -n 1 | awk 'BEGIN { FS = "[ \t]*|[ \t\\/]+" } { print $4 }' } -- ljk >> For $LBLNET_PREFIX_IPV6 = fd7b:826d:f2::/64, which is what our README says it >> should be, the original get_ipv6_addr function returns fd7b:826d:f2:0:21c:c4ff:febd:8a20 >> whereas this modified function returns fd7b:826d:f2:0:21c:c4ff:febd:8a20/64. >> Which should it be? > > It needs to be without the "/64" or else the sed command blows up when I run > 'make install_server'. > > FWIW, I actually hit all 3 cases of the get_ipv6_prefix() function when I was getting > these tests to work again so I'm a bit concerned about taking some of the hacks out. > > -- ljk > >> -- ljk >> >>> } >>> >>> #### >>> >>> >>> ------------------------------------------------------------------------------ >>> Colocation vs. Managed Hosting >>> A question and answer guide to determining the best fit >>> for your organization - today and in the future. >>> http://p.sf.net/sfu/internap-sfd2d >>> _______________________________________________ >>> Audit-test-developer mailing list >>> Aud...@li... >>> https://lists.sourceforge.net/lists/listinfo/audit-test-developer >> >> ------------------------------------------------------------------------------ >> Colocation vs. Managed Hosting >> A question and answer guide to determining the best fit >> for your organization - today and in the future. >> http://p.sf.net/sfu/internap-sfd2d >> _______________________________________________ >> Audit-test-developer mailing list >> Aud...@li... >> https://lists.sourceforge.net/lists/listinfo/audit-test-developer > |