Browse code

bump lib network to 92d1fbe1eb0883cf11d283cea8e658275146411d

full diff: https://github.com/docker/libnetwork/compare/09cdcc8c0eab3946c2d70e8f6225b05baf1e90d1...92d1fbe1eb0883cf11d283cea8e658275146411d

relevant changes included (omitting some changes that were added _and_ reverted in this bump):

- docker/libnetwork#2433 Fix parseIP error when parseIP before get AddressFamily
- fixes docker/libnetwork#2431 parseIP Error ip=[172 17 0 2 0 0 0 0 0 0 0 0 0 0 0 0]
- https://github.com/docker/libnetwork/issues/2289
- this was a regression introduced in docker/libnetwork#2416 Fix hardcoded AF_INET for IPv6 address handling
- docker/libnetwork#2440 Bump hashicorp go-sockaddr v1.0.2, go-multierror v1.0.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit bab58c19246bfaad9bbff8dd88f1b6a224b8dc22)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/09/03 18:45:19
Showing 4 changed files
... ...
@@ -3,7 +3,7 @@
3 3
 # LIBNETWORK_COMMIT is used to build the docker-userland-proxy binary. When
4 4
 # updating the binary version, consider updating github.com/docker/libnetwork
5 5
 # in vendor.conf accordingly
6
-LIBNETWORK_COMMIT=09cdcc8c0eab3946c2d70e8f6225b05baf1e90d1
6
+LIBNETWORK_COMMIT=92d1fbe1eb0883cf11d283cea8e658275146411d
7 7
 
8 8
 install_proxy() {
9 9
 	case "$1" in
... ...
@@ -39,7 +39,7 @@ github.com/gofrs/flock                              7f43ea2e6a643ad441fc12d0ecc0
39 39
 # libnetwork
40 40
 
41 41
 # When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy.installer accordingly
42
-github.com/docker/libnetwork                        09cdcc8c0eab3946c2d70e8f6225b05baf1e90d1
42
+github.com/docker/libnetwork                        92d1fbe1eb0883cf11d283cea8e658275146411d
43 43
 github.com/docker/go-events                         9461782956ad83b30282bf90e31fa6a70c255ba9
44 44
 github.com/armon/go-radix                           e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
45 45
 github.com/armon/go-metrics                         eb0af217e5e9747e41dd5303755356b62d28e3ec
... ...
@@ -315,6 +315,7 @@ func assembleStats(msg []byte) (SvcStats, error) {
315 315
 func assembleService(attrs []syscall.NetlinkRouteAttr) (*Service, error) {
316 316
 
317 317
 	var s Service
318
+	var addressBytes []byte
318 319
 
319 320
 	for _, attr := range attrs {
320 321
 
... ...
@@ -327,11 +328,7 @@ func assembleService(attrs []syscall.NetlinkRouteAttr) (*Service, error) {
327 327
 		case ipvsSvcAttrProtocol:
328 328
 			s.Protocol = native.Uint16(attr.Value)
329 329
 		case ipvsSvcAttrAddress:
330
-			ip, err := parseIP(attr.Value, s.AddressFamily)
331
-			if err != nil {
332
-				return nil, err
333
-			}
334
-			s.Address = ip
330
+			addressBytes = attr.Value
335 331
 		case ipvsSvcAttrPort:
336 332
 			s.Port = binary.BigEndian.Uint16(attr.Value)
337 333
 		case ipvsSvcAttrFWMark:
... ...
@@ -353,6 +350,16 @@ func assembleService(attrs []syscall.NetlinkRouteAttr) (*Service, error) {
353 353
 		}
354 354
 
355 355
 	}
356
+
357
+	// parse Address after parse AddressFamily incase of parseIP error
358
+	if addressBytes != nil {
359
+		ip, err := parseIP(addressBytes, s.AddressFamily)
360
+		if err != nil {
361
+			return nil, err
362
+		}
363
+		s.Address = ip
364
+	}
365
+
356 366
 	return &s, nil
357 367
 }
358 368
 
... ...
@@ -416,6 +423,7 @@ func (i *Handle) doCmdWithoutAttr(cmd uint8) ([][]byte, error) {
416 416
 func assembleDestination(attrs []syscall.NetlinkRouteAttr) (*Destination, error) {
417 417
 
418 418
 	var d Destination
419
+	var addressBytes []byte
419 420
 
420 421
 	for _, attr := range attrs {
421 422
 
... ...
@@ -426,11 +434,7 @@ func assembleDestination(attrs []syscall.NetlinkRouteAttr) (*Destination, error)
426 426
 		case ipvsDestAttrAddressFamily:
427 427
 			d.AddressFamily = native.Uint16(attr.Value)
428 428
 		case ipvsDestAttrAddress:
429
-			ip, err := parseIP(attr.Value, d.AddressFamily)
430
-			if err != nil {
431
-				return nil, err
432
-			}
433
-			d.Address = ip
429
+			addressBytes = attr.Value
434 430
 		case ipvsDestAttrPort:
435 431
 			d.Port = binary.BigEndian.Uint16(attr.Value)
436 432
 		case ipvsDestAttrForwardingMethod:
... ...
@@ -453,6 +457,16 @@ func assembleDestination(attrs []syscall.NetlinkRouteAttr) (*Destination, error)
453 453
 			d.Stats = DstStats(stats)
454 454
 		}
455 455
 	}
456
+
457
+	// parse Address after parse AddressFamily incase of parseIP error
458
+	if addressBytes != nil {
459
+		ip, err := parseIP(addressBytes, d.AddressFamily)
460
+		if err != nil {
461
+			return nil, err
462
+		}
463
+		d.Address = ip
464
+	}
465
+
456 466
 	return &d, nil
457 467
 }
458 468
 
... ...
@@ -26,11 +26,12 @@ google.golang.org/genproto              694d95ba50e67b2e363f3483057db5d4910c18f9
26 26
 github.com/godbus/dbus                  5f6efc7ef2759c81b7ba876593971bfce311eab3 # v4.0.0
27 27
 github.com/gorilla/mux                  c5c6c98bc25355028a63748a498942a6398ccd22 # v1.7.1
28 28
 github.com/hashicorp/consul             9a9cc9341bb487651a0399e3fc5e1e8a42e62dd9 # v0.5.2
29
+github.com/hashicorp/errwrap            8a6fb523712970c966eefc6b39ed2c5e74880354 # v1.0.0
29 30
 github.com/hashicorp/go-msgpack         71c2886f5a673a35f909803f38ece5810165097b
30
-github.com/hashicorp/go-multierror      fcdddc395df1ddf4247c69bd436e84cfa0733f7e
31
+github.com/hashicorp/go-multierror      886a7fbe3eb1c874d46f623bfa70af45f425b3d1 # v1.0.0
31 32
 github.com/hashicorp/memberlist         3d8438da9589e7b608a83ffac1ef8211486bcb7c
32 33
 github.com/sean-/seed                   e2103e2c35297fb7e17febb81e49b312087a2372
33
-github.com/hashicorp/go-sockaddr        6d291a969b86c4b633730bfc6b8b9d64c3aafed9
34
+github.com/hashicorp/go-sockaddr        c7188e74f6acae5a989bdc959aa779f8b9f42faf # v1.0.2
34 35
 github.com/hashicorp/serf               598c54895cc5a7b1a24a398d635e8c0ea0959870
35 36
 github.com/mattn/go-shellwords          02e3cf038dcea8290e44424da473dd12be796a8a # v1.0.3
36 37
 github.com/miekg/dns                    e57bf427e68187a27e22adceac868350d7a7079b # v1.0.7