Adding rule with "From" option doesn't work

Romary Sonrier romary at sonrier.com
Tue May 3 04:03:38 EDT 2011


Hello guys,

I am using libnl 3.0 from git (cc33b0940f8ca0a34c9fbc085963e7887adc4db7)

I am trying to add rules to the kernel routing engine, using libnl.
(kernel 2.6.35-28-generic x86_64 GNU/Linux / Ubuntu)

What i'm trying to do would be , with iproute2 :*ip rule add from
127.0.0.1 table 10 prio 100*

There is not any tool like  src/nl-rule-add.c yet, so i did my own , you
can find it as attachement.

It seems that the call :*rtnl_rule_set_src(rule, a)* doesn't have any
effect.

Do you have any idea?

I tried to compare with iproute2 code source, but that's not that easy.
They use a struct "struct rtmsg", that is not use in libnl.

Any help would be welcome....

Regards,

Romary Sonrier

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20110503/4076c256/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libnl_src_nl-add-rule.patch
Type: text/x-patch
Size: 2261 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20110503/4076c256/attachment.bin>


More information about the libnl mailing list