diff options
author | asomers <asomers@FreeBSD.org> | 2014-04-25 14:35:30 +0000 |
---|---|---|
committer | asomers <asomers@FreeBSD.org> | 2014-04-25 14:35:30 +0000 |
commit | 4d0d1f47bd796b2298306297d0ae312579f1f149 (patch) | |
tree | 5d6835189e3defc59a1e50ef07e376504ec1f68c /tests | |
parent | 6c68fcc49585c4ce5a424e0c6919e77cbcf235af (diff) | |
download | FreeBSD-src-4d0d1f47bd796b2298306297d0ae312579f1f149.zip FreeBSD-src-4d0d1f47bd796b2298306297d0ae312579f1f149.tar.gz |
Style fixes, mostly trailing whitespace elimination. No functional change.
Reported by: pho
MFC after: 3 weeks
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/sys/netinet/fibs_test.sh | 16 | ||||
-rw-r--r-- | tests/sys/netinet/udp_dontroute.c | 13 |
2 files changed, 15 insertions, 14 deletions
diff --git a/tests/sys/netinet/fibs_test.sh b/tests/sys/netinet/fibs_test.sh index 9f2c417..dc51b54 100755 --- a/tests/sys/netinet/fibs_test.sh +++ b/tests/sys/netinet/fibs_test.sh @@ -1,7 +1,7 @@ # # Copyright (c) 2014 Spectra Logic Corporation # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: @@ -13,7 +13,7 @@ # ("Disclaimer") and any redistribution must be conditioned upon # including a substantially similar Disclaimer requirement for further # binary redistribution. -# +# # NO WARRANTY # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -26,7 +26,7 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGES. -# +# # Authors: Alan Somers (Spectra Logic Corporation) # # $FreeBSD$ @@ -43,7 +43,7 @@ # Simulate a crossover cable between them by using net/socat # Use nping (from security/nmap) to send an ICMP echo request from one # interface to the other, spoofing the source IP. The source IP must be -# spoofed, or else it will already have an entry in the arp table. +# spoofed, or else it will already have an entry in the arp table. # Check whether an arp entry exists for the spoofed IP atf_test_case arpresolve_checks_interface_fib cleanup arpresolve_checks_interface_fib_head() @@ -84,7 +84,7 @@ arpresolve_checks_interface_fib_body() socat /dev/${TAP0} /dev/${TAP1} & SOCAT_PID=$! echo ${SOCAT_PID} >> "processes_to_kill" - + # Send an ICMP echo request with a spoofed source IP setfib 2 nping -c 1 -e ${TAP0} -S ${SPOOF_ADDR} \ --source-mac ${SPOOF_MAC} --icmp --icmp-type "echo-request" \ @@ -307,9 +307,9 @@ udp_dontroute_cleanup() atf_init_test_cases() { atf_add_test_case arpresolve_checks_interface_fib - atf_add_test_case loopback_and_network_routes_on_nondefault_fib - atf_add_test_case default_route_with_multiple_fibs_on_same_subnet - atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet + atf_add_test_case loopback_and_network_routes_on_nondefault_fib + atf_add_test_case default_route_with_multiple_fibs_on_same_subnet + atf_add_test_case subnet_route_with_multiple_fibs_on_same_subnet atf_add_test_case udp_dontroute } diff --git a/tests/sys/netinet/udp_dontroute.c b/tests/sys/netinet/udp_dontroute.c index 6952f99..1e162a1 100644 --- a/tests/sys/netinet/udp_dontroute.c +++ b/tests/sys/netinet/udp_dontroute.c @@ -1,7 +1,7 @@ /* * Copyright (c) 2014 Spectra Logic Corporation * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -13,7 +13,7 @@ * ("Disclaimer") and any redistribution must be conditioned upon * including a substantially similar Disclaimer requirement for further * binary redistribution. - * + * * NO WARRANTY * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -26,7 +26,7 @@ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. - * + * * Authors: Alan Somers (Spectra Logic Corporation) * * $FreeBSD$ @@ -43,11 +43,12 @@ #include <stdlib.h> #include <string.h> -/* +/* * Sends a single UDP packet to the provided address, with SO_DONTROUTE set * I couldn't find a way to do this with builtin utilities like nc(1) */ -int main(int argc, char **argv) +int +main(int argc, char **argv) { struct sockaddr_in dst; int s; @@ -80,6 +81,6 @@ int main(int argc, char **argv) dst.sin_len); if (ret == -1) err(errno, "sendto"); - + return (0); } |