Commit Graph

21 Commits

Author SHA1 Message Date
Vishvananda Ishaya Abrams 63ca7e48f5 Support setting and retrieving route MTU/AdvMSS 2017-11-09 14:04:31 -08:00
Vincent Bernat cda96d38a7 route: add `Equal()` method to compare routes
All fields are compared for strict equality.
2017-09-24 11:00:50 -07:00
Vincent Bernat bda7895ec3 route: introduce `ipNetEqual()` helper function
This tests equality between two IPNet pointers.
2017-09-24 11:00:50 -07:00
Vincent Bernat 067fdf3bb1 route: fix display of nexthop gateway for multipath routes
This is a `net.IP` and therefore, we should use `%s`. Using `%d` gives
something like this:

    Gw: [0 0 0 0 0 0 0 0 0 0 255 255 192 168 24 2]

After this fix, we get:

    Gw: 192.168.24.2
2017-09-24 11:00:10 -07:00
ISHIDA Wataru fe3b5664d2 support MPLS
$ ip -M route add 100 dev eth0
$ ip -M route add 100 as to 200/300 dev eth0
$ ip -M route add 100 nexthop dev eth0 as to 200 \
                      nexthop dev eth1 as to 300
$ ip route add 10.10.0.0/24 encap mpls 200/300 dev eth0
$ ip route add 10.0.0.0/24 nexthop encap mpls 200 dev eth0 \
                           nexthop encap mpls 300 dev eth1

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-02-20 12:07:19 -08:00
Wataru Ishida 87909c6dad Add Flags in NexthopInfo
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-02-13 13:53:26 -08:00
Vish Ishaya 0bc457d244 fix darwin build by moving code (#138)
Fixes issue #135
2016-06-15 08:44:14 -07:00
Wataru Ishida 01c64f1d8a Support multipath (#134)
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-14 22:02:24 -07:00
GennadySpb 3236dc177e Add route table number as significant info about route object (#103) 2016-04-28 13:16:53 -07:00
Everton Marques afa33d45e9 AddrSubscribe(): receive updates for changes in link addresses. 2016-01-28 17:27:24 -02:00
marek-polewski 889a43b83d remove routeFilter struct and use route and mask instead
rename iif to iLinkIndex
2015-12-08 23:35:55 +01:00
marek-polewski dfdad47336 add protocol, priority, table, type, tos to route 2015-11-26 16:09:33 +01:00
Anton Aksola a2c125fb6c Add support for setting nexthop flags for routes
There are few nexthop flags that are usable in some scenarios: onlink
and pervasive. This patch allows to set, clear and list them.
2015-10-09 11:17:13 +03:00
Bryan Boreham 69942a0c81 Subscribe for async updates on links and routes 2015-08-19 15:42:33 +01:00
Vishvananda Ishaya 7663a3b4b6 Dst may be nil, so don't force it to String()
Fixes #14
2015-01-14 07:59:00 -08:00
Eugene Yakubovich e7911d879f Use LinkIndex instead of Link obj in Route, Neigh
Having object composition causes both client and library to
do potentially unecessary work to retrieve Link attributes
when only index is often sufficient.
2014-10-13 16:09:09 -07:00
Vishvananda Ishaya f87c54f846 Make links have different types 2014-09-24 16:32:16 -07:00
Vishvananda Ishaya 349cca1850 Formatting cleanup 2014-09-15 17:06:08 -07:00
Vishvananda Ishaya 950b852cad Add scope parameter to route 2014-09-14 17:44:56 -07:00
Vishvananda Ishaya 9f98335fb3 Change route to hold pointers to structs 2014-09-07 11:27:46 -07:00
Vishvananda Ishaya 8dab8b7462 Initial commit of netlink package 2014-08-31 20:34:46 -07:00