link: Allow to bind interfaces to bonds. * ip/link.scm (link-set): Add new argument `master'. It should be the name of the master interface to which our current device has to be bound. Signed-off-by: Julien Lepiller <julien@lepiller.eu>
ip/link.scm
| 164 | 164 | (trailers-on #f) (trailers-off #f) | |
| 165 | 165 | (carrier-on #f) (carrier-off #f) | |
| 166 | 166 | (txqueuelen #f) (name #f) (address #f) | |
| 167 | - | (broadcast #f) (mtu #f) (netns #f)) | |
| 167 | + | (broadcast #f) (mtu #f) (netns #f) | |
| 168 | + | (master #f)) | |
| 168 | 169 | (define request-num (random 65535)) | |
| 169 | 170 | (define id (if (number? device) device (link-name->index device))) | |
| 170 | 171 | (define netnsfd (cond | |
… | |||
| 229 | 230 | (make-route-attr IFLA_MTU | |
| 230 | 231 | (make-u32-route-attr mtu))) | |
| 231 | 232 | '()) | |
| 233 | + | ,@(if master | |
| 234 | + | (list | |
| 235 | + | (make-route-attr IFLA_MASTER | |
| 236 | + | (make-u32-route-attr (link-name->index master)))) | |
| 237 | + | '()) | |
| 232 | 238 | ,@(if netns | |
| 233 | 239 | (list | |
| 234 | 240 | (make-route-attr IFLA_NET_NS_FD | |