diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/route.txt | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/doc/route.txt b/doc/route.txt index 61a84c45..cd24eefa 100644 --- a/doc/route.txt +++ b/doc/route.txt @@ -693,15 +693,12 @@ int master_index; if (!(master_index = rtnl_link_name2i(link_cache, "eth0"))) /* error */ -/* allocate new link object to configure the vlan device */ -link = rtnl_link_alloc(); +/* allocate new link object of type vlan */ +link = rtnl_link_vlan_alloc(); /* set eth0 to be our master device */ rtnl_link_set_link(link, master_index); -if ((err = rtnl_link_set_type(link, "vlan")) < 0) - /* error */ - rtnl_link_vlan_set_id(link, 10); if ((err = rtnl_link_add(sk, link, NLM_F_CREATE)) < 0) |