1
0
mirror of https://github.com/golang/go synced 2024-10-04 06:21:23 -06:00
go/src
Mikio Hara 8c0a52f28d net: handle IP interface stack correctly on linux
A configuration like the following:

7: tun6rd: <NOARP,UP,LOWER_UP> mtu 1280
        link/sit 10.11.12.13 brd 0.0.0.0
        inet 1.2.3.4/24 scope global tun6rd
        inet6 2014:1001:a0b:c0d::1/32 scope global
        inet6 ::10.11.12.13/128 scope global
9: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1496
        link/ppp
        inet 192.168.101.234 peer 192.168.102.234/32 scope global ppp0
        inet 10.20.30.40/24 scope global ppp0
        inet6 2014:1002::1/64 scope global
11: tun0@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480
        link/ipip 192.168.202.34 peer 192.168.202.69
        inet 192.168.10.1/24 scope global tunnel0
        inet6 2014:1003::1/64 scope global

will be handled like below.

"tun6rd": flags "up", ifindex 7, mtu 1280
        hardware address ""
        interface address "1.2.3.4/24"
        interface address "2014:1001:a0b:c0d::1/32"
        interface address "::a0b:c0d/128"
"ppp0": flags "up|pointtopoint|multicast", ifindex 9, mtu 1496
        hardware address ""
        interface address "192.168.101.234/32"
        interface address "10.20.30.40/24"
        interface address "2014:1002::1/64"
"tun0": flags "up|pointtopoint", ifindex 11, mtu 1480
        hardware address ""
        interface address "192.168.10.1/24"
        interface address "2014:1003::1/64"

Fixes #6433.
Update #4839

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/57700043
2014-02-15 01:07:51 +09:00
..
cmd cmd/gc: fix build for 'default unsigned char' compilers 2014-02-14 00:43:43 -05:00
lib9 lib9: fix Solaris build 2014-02-13 20:30:42 +01:00
libbio lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
liblink cmd/gc: rename AFATVARDEF to AVARDEF 2014-02-13 22:17:22 -05:00
libmach libmach: use different names for different Ureg types 2014-01-08 20:37:27 -05:00
pkg net: handle IP interface stack correctly on linux 2014-02-15 01:07:51 +09:00
all.bash
all.bat
all.rc
clean.bash
clean.bat
clean.rc
make.bash cmd/go, cmd/cgo, make.bash: cross compiling with cgo enabled 2014-02-06 09:11:00 -08:00
make.bat cmd/dist: fix windows build. 2013-08-02 14:29:04 -07:00
Make.dist
make.rc lib9: enable on Plan 9 2014-02-13 20:06:41 +01:00
race.bash race.bash, race.bat: build a race enabled cmd/cgo before trying to use it 2013-09-29 10:34:41 +10:00
race.bat race.bat: set exit status 2013-12-17 15:09:42 +04:00
run.bash cgo: enable cgo on dragonfly 2013-09-04 15:19:21 -07:00
run.bat runtime/race: add end-to-end test on windows 2013-08-15 12:13:00 +10:00
run.rc build: fix typos in run.rc 2014-01-28 06:17:38 +01:00
sudo.bash