Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189175
b: refs/heads/master
c: 7438189
h: refs/heads/master
i:
  189173: 7e40346
  189171: f601a80
  189167: 0b53e6f
v: v3
  • Loading branch information
Nicolas Dichtel authored and David S. Miller committed Mar 27, 2010
1 parent 385da1d commit 8eeff19
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e7d481a6f3c13041446b7bb8f98ab861460076a3
refs/heads/master: 7438189baa0a2fe30084bdc97e3d540ebc5444f3
11 changes: 7 additions & 4 deletions trunk/net/ipv4/ipmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1616,17 +1616,20 @@ ipmr_fill_mroute(struct sk_buff *skb, struct mfc_cache *c, struct rtmsg *rtm)
int ct;
struct rtnexthop *nhp;
struct net *net = mfc_net(c);
struct net_device *dev = net->ipv4.vif_table[c->mfc_parent].dev;
u8 *b = skb_tail_pointer(skb);
struct rtattr *mp_head;

if (dev)
RTA_PUT(skb, RTA_IIF, 4, &dev->ifindex);
/* If cache is unresolved, don't try to parse IIF and OIF */
if (c->mfc_parent > MAXVIFS)
return -ENOENT;

if (VIF_EXISTS(net, c->mfc_parent))
RTA_PUT(skb, RTA_IIF, 4, &net->ipv4.vif_table[c->mfc_parent].dev->ifindex);

mp_head = (struct rtattr *)skb_put(skb, RTA_LENGTH(0));

for (ct = c->mfc_un.res.minvif; ct < c->mfc_un.res.maxvif; ct++) {
if (c->mfc_un.res.ttls[ct] < 255) {
if (VIF_EXISTS(net, ct) && c->mfc_un.res.ttls[ct] < 255) {
if (skb_tailroom(skb) < RTA_ALIGN(RTA_ALIGN(sizeof(*nhp)) + 4))
goto rtattr_failure;
nhp = (struct rtnexthop *)skb_put(skb, RTA_ALIGN(sizeof(*nhp)));
Expand Down
11 changes: 7 additions & 4 deletions trunk/net/ipv6/ip6mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1695,17 +1695,20 @@ ip6mr_fill_mroute(struct sk_buff *skb, struct mfc6_cache *c, struct rtmsg *rtm)
int ct;
struct rtnexthop *nhp;
struct net *net = mfc6_net(c);
struct net_device *dev = net->ipv6.vif6_table[c->mf6c_parent].dev;
u8 *b = skb_tail_pointer(skb);
struct rtattr *mp_head;

if (dev)
RTA_PUT(skb, RTA_IIF, 4, &dev->ifindex);
/* If cache is unresolved, don't try to parse IIF and OIF */
if (c->mf6c_parent > MAXMIFS)
return -ENOENT;

if (MIF_EXISTS(net, c->mf6c_parent))
RTA_PUT(skb, RTA_IIF, 4, &net->ipv6.vif6_table[c->mf6c_parent].dev->ifindex);

mp_head = (struct rtattr *)skb_put(skb, RTA_LENGTH(0));

for (ct = c->mfc_un.res.minvif; ct < c->mfc_un.res.maxvif; ct++) {
if (c->mfc_un.res.ttls[ct] < 255) {
if (MIF_EXISTS(net, ct) && c->mfc_un.res.ttls[ct] < 255) {
if (skb_tailroom(skb) < RTA_ALIGN(RTA_ALIGN(sizeof(*nhp)) + 4))
goto rtattr_failure;
nhp = (struct rtnexthop *)skb_put(skb, RTA_ALIGN(sizeof(*nhp)));
Expand Down

0 comments on commit 8eeff19

Please sign in to comment.