@@ -20,7 +20,7 @@ func TestEgressRouter(t *testing.T) {
20
20
dest : "10.1.2.3" ,
21
21
output : `
22
22
-A PREROUTING -i eth0 -j DNAT --to-destination 10.1.2.3
23
- -A POSTROUTING -j SNAT --to-source 1.2.3.4
23
+ -A POSTROUTING -o macvlan0 - j SNAT --to-source 1.2.3.4
24
24
` ,
25
25
},
26
26
{
@@ -29,7 +29,7 @@ func TestEgressRouter(t *testing.T) {
29
29
dest : "10.1.2.3" ,
30
30
output : `
31
31
-A PREROUTING -i eth0 -j DNAT --to-destination 10.1.2.3
32
- -A POSTROUTING -j SNAT --to-source 1.2.3.4
32
+ -A POSTROUTING -o macvlan0 - j SNAT --to-source 1.2.3.4
33
33
` ,
34
34
},
35
35
{
@@ -38,7 +38,7 @@ func TestEgressRouter(t *testing.T) {
38
38
dest : "10.1.2.3" ,
39
39
output : `
40
40
-A PREROUTING -i eth0 -j DNAT --to-destination 10.1.2.3
41
- -A POSTROUTING -j SNAT --to-source 1.2.3.4
41
+ -A POSTROUTING -o macvlan0 - j SNAT --to-source 1.2.3.4
42
42
` ,
43
43
},
44
44
{
@@ -47,7 +47,7 @@ func TestEgressRouter(t *testing.T) {
47
47
dest : "10.1.2.3\n " ,
48
48
output : `
49
49
-A PREROUTING -i eth0 -j DNAT --to-destination 10.1.2.3
50
- -A POSTROUTING -j SNAT --to-source 1.2.3.4
50
+ -A POSTROUTING -o macvlan0 - j SNAT --to-source 1.2.3.4
51
51
` ,
52
52
},
53
53
{
@@ -56,7 +56,7 @@ func TestEgressRouter(t *testing.T) {
56
56
dest : "80 tcp 10.4.5.6" ,
57
57
output : `
58
58
-A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination 10.4.5.6
59
- -A POSTROUTING -j SNAT --to-source 1.2.3.4
59
+ -A POSTROUTING -o macvlan0 - j SNAT --to-source 1.2.3.4
60
60
` ,
61
61
},
62
62
{
@@ -65,7 +65,7 @@ func TestEgressRouter(t *testing.T) {
65
65
dest : "8080 tcp 10.7.8.9 80" ,
66
66
output : `
67
67
-A PREROUTING -i eth0 -p tcp --dport 8080 -j DNAT --to-destination 10.7.8.9:80
68
- -A POSTROUTING -j SNAT --to-source 1.2.3.4
68
+ -A POSTROUTING -o macvlan0 - j SNAT --to-source 1.2.3.4
69
69
` ,
70
70
},
71
71
{
@@ -75,7 +75,7 @@ func TestEgressRouter(t *testing.T) {
75
75
output : `
76
76
-A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination 10.4.5.6
77
77
-A PREROUTING -i eth0 -p tcp --dport 8080 -j DNAT --to-destination 10.7.8.9:80
78
- -A POSTROUTING -j SNAT --to-source 1.2.3.4
78
+ -A POSTROUTING -o macvlan0 - j SNAT --to-source 1.2.3.4
79
79
` ,
80
80
},
81
81
{
@@ -86,7 +86,7 @@ func TestEgressRouter(t *testing.T) {
86
86
-A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination 10.4.5.6
87
87
-A PREROUTING -i eth0 -p tcp --dport 8080 -j DNAT --to-destination 10.7.8.9:80
88
88
-A PREROUTING -i eth0 -j DNAT --to-destination 10.1.2.3
89
- -A POSTROUTING -j SNAT --to-source 1.2.3.4
89
+ -A POSTROUTING -o macvlan0 - j SNAT --to-source 1.2.3.4
90
90
` ,
91
91
},
92
92
{
@@ -115,7 +115,7 @@ func TestEgressRouter(t *testing.T) {
115
115
-A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination 10.4.5.6
116
116
-A PREROUTING -i eth0 -p tcp --dport 8080 -j DNAT --to-destination 10.7.8.9:80
117
117
-A PREROUTING -i eth0 -j DNAT --to-destination 10.1.2.3
118
- -A POSTROUTING -j SNAT --to-source 1.2.3.4
118
+ -A POSTROUTING -o macvlan0 - j SNAT --to-source 1.2.3.4
119
119
` ,
120
120
},
121
121
}
0 commit comments