rename rtnl_mirred_set_index() to rtnl_mirred_set_ifindex()
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
parent
b5309e1ea4
commit
017c971142
3 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
extern int rtnl_mirred_set_action(struct rtnl_act *, int);
|
||||
extern int rtnl_mirred_set_index(struct rtnl_act *, uint32_t);
|
||||
extern int rtnl_mirred_set_ifindex(struct rtnl_act *, uint32_t);
|
||||
extern int rtnl_mirred_set_policy(struct rtnl_act *, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -151,14 +151,14 @@ int rtnl_mirred_set_action(struct rtnl_act *act, int action)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int rtnl_mirred_set_index(struct rtnl_act *act, uint32_t link)
|
||||
int rtnl_mirred_set_ifindex(struct rtnl_act *act, uint32_t ifindex)
|
||||
{
|
||||
struct rtnl_mirred *u;
|
||||
|
||||
if (!(u = (struct rtnl_mirred *) rtnl_tc_data(TC_CAST(act))))
|
||||
return -NLE_NOMEM;
|
||||
|
||||
u->m_parm.ifindex = link;
|
||||
u->m_parm.ifindex = ifindex;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -382,7 +382,7 @@ int main(void)
|
|||
rtnl_tc_set_kind(TC_CAST(act), "mirred");
|
||||
rtnl_mirred_set_action(act, TCA_EGRESS_REDIR);
|
||||
rtnl_mirred_set_policy(act, TC_ACT_STOLEN);
|
||||
rtnl_mirred_set_index(act, rtnl_link_name2i(link_cache, "eth1"));
|
||||
rtnl_mirred_set_ifindex(act, rtnl_link_name2i(link_cache, "eth1"));
|
||||
// /8 check
|
||||
|
||||
// 10.0.0.0/8
|
||||
|
|
Loading…
Add table
Reference in a new issue