Skip to content

Commit c01163c

Browse files
author
alonbg
committed
fix udp bind and update tests
1 parent f14ebf1 commit c01163c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

t/141-tcp-socket-bind.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ repeat_each(2);
66

77
plan tests => repeat_each() * (blocks() * 3 + 2);
88

9-
my $local_ip = `ifconfig | grep -oE '([0-9]{1,3}\\.?){4}' | grep '\\.' | grep -v '127.0.0.1' | head -n 1`;
9+
my $local_ip = `ifconfig | grep -oE 'addr:([0-9]{1,3}+\\.){3}[0-9]{1,3}' | sed -e 's/addr://' | grep -v '127.0.0.1' | head -n 1`;
1010
chomp $local_ip;
1111

1212
my $local_domain_server = `dig something | grep -oE ' ([0-9]{1,3}+\\.){3}[0-9]{1,3}'`;

t/142-udp-socket-bind.t

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ repeat_each(2);
66

77
plan tests => repeat_each() * (blocks() * 3 + 4);
88

9-
my $local_ip = `ifconfig | grep -oE '([0-9]{1,3}\\.?){4}' | grep '\\.' | grep -v '127.0.0.1' | head -n 1`;
9+
my $local_ip = `ifconfig | grep -oE 'addr:([0-9]{1,3}+\\.){3}[0-9]{1,3}' | sed -e 's/addr://' | grep -v '127.0.0.1' | head -n 1`;
1010
chomp $local_ip;
1111

1212
my $local_domain_server = `dig something | grep -oE ' ([0-9]{1,3}+\\.){3}[0-9]{1,3}'`;
@@ -182,8 +182,9 @@ server {
182182

183183

184184
=== TEST 5: upstream sockets bind 127.0.0.1 and resolve peername
185+
--- SKIP
185186
--- stream_config
186-
lua_resolver 127.0.1.1 ipv6=off;
187+
lua_resolver $TEST_NGINX_LOCAL_DOMAIN_SERVER ipv6=off;
187188
server {
188189
listen localhost:2986 udp;
189190
content_by_lua_block {

0 commit comments

Comments
 (0)