summaryrefslogtreecommitdiffstats
path: root/testsuite/tests/ip/link/add_type_bareudp.t
blob: 8a2a1edf10dab5ddf979128f078d4309db103bc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/sh

. lib/generic.sh

ts_log "[Testing Add BareUDP interface (unicast MPLS)]"
NEW_DEV="$(rand_dev)"

ts_ip "$0" "Add $NEW_DEV BareUDP interface (unicast MPLS)" link add dev $NEW_DEV type bareudp dstport 6635 ethertype mpls_uc

ts_ip "$0" "Show $NEW_DEV BareUDP interface (unicast MPLS)" -d link show dev $NEW_DEV
test_on "$NEW_DEV"
test_on "dstport 6635"
test_on "ethertype mpls_uc"
test_on "nomultiproto"

ts_ip "$0" "Del $NEW_DEV BareUDP interface (unicast MPLS)" link del dev $NEW_DEV


ts_log "[Testing Add BareUDP interface (multicast MPLS)]"
NEW_DEV="$(rand_dev)"

ts_ip "$0" "Add $NEW_DEV BareUDP interface (multicast MPLS)" link add dev $NEW_DEV type bareudp dstport 6635 ethertype mpls_mc

ts_ip "$0" "Show $NEW_DEV BareUDP interface (multicast MPLS)" -d link show dev $NEW_DEV
test_on "$NEW_DEV"
test_on "dstport 6635"
test_on "ethertype mpls_mc"
test_on "nomultiproto"

ts_ip "$0" "Del $NEW_DEV BareUDP interface (multicast MPLS)" link del dev $NEW_DEV


ts_log "[Testing Add BareUDP interface (unicast and multicast MPLS)]"
NEW_DEV="$(rand_dev)"

ts_ip "$0" "Add $NEW_DEV BareUDP interface (unicast and multicast MPLS)" link add dev $NEW_DEV type bareudp dstport 6635 ethertype mpls_uc multiproto

ts_ip "$0" "Show $NEW_DEV BareUDP interface (unicast and multicast MPLS)" -d link show dev $NEW_DEV
test_on "$NEW_DEV"
test_on "dstport 6635"
test_on "ethertype mpls_uc"
test_on "multiproto"

ts_ip "$0" "Del $NEW_DEV BareUDP interface (unicast and multicast MPLS)" link del dev $NEW_DEV


ts_log "[Testing Add BareUDP interface (IPv4)]"
NEW_DEV="$(rand_dev)"

ts_ip "$0" "Add $NEW_DEV BareUDP interface (IPv4)" link add dev $NEW_DEV type bareudp dstport 6635 ethertype ipv4

ts_ip "$0" "Show $NEW_DEV BareUDP interface (IPv4)" -d link show dev $NEW_DEV
test_on "$NEW_DEV"
test_on "dstport 6635"
test_on "ethertype ip"
test_on "nomultiproto"

ts_ip "$0" "Del $NEW_DEV BareUDP interface (IPv4)" link del dev $NEW_DEV


ts_log "[Testing Add BareUDP interface (IPv6)]"
NEW_DEV="$(rand_dev)"

ts_ip "$0" "Add $NEW_DEV BareUDP interface (IPv6)" link add dev $NEW_DEV type bareudp dstport 6635 ethertype ipv6

ts_ip "$0" "Show $NEW_DEV BareUDP interface (IPv6)" -d link show dev $NEW_DEV
test_on "$NEW_DEV"
test_on "dstport 6635"
test_on "ethertype ipv6"
test_on "nomultiproto"

ts_ip "$0" "Del $NEW_DEV BareUDP interface (IPv6)" link del dev $NEW_DEV


ts_log "[Testing Add BareUDP interface (IPv4 and IPv6)]"
NEW_DEV="$(rand_dev)"

ts_ip "$0" "Add $NEW_DEV BareUDP interface (IPv4 and IPv6)" link add dev $NEW_DEV type bareudp dstport 6635 ethertype ipv4 multiproto

ts_ip "$0" "Show $NEW_DEV BareUDP interface (IPv4 and IPv6)" -d link show dev $NEW_DEV
test_on "$NEW_DEV"
test_on "dstport 6635"
test_on "ethertype ip"
test_on "multiproto"

ts_ip "$0" "Del $NEW_DEV BareUDP interface (IPv4 and IPv6)" link del dev $NEW_DEV