Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.25-rc7 /net/sched/em_text.c

Filename:/net/sched/em_text.c
Lines Added:6
Lines Deleted:3
Also changed in: (Previous) 2.6.25-rc6  2.6.25-rc5  2.6.25-rc4  2.6.25-rc3  2.6.25-rc2  2.6.25-rc1 
(Following) 2.6.25-rc8  2.6.25-rc9  2.6.25 

Location
[  2.6.25-rc7
  [  net
    [  sched
       o  em_text.c

Patch

diff --git a/net/sched/em_text.c b/net/sched/em_text.c
index d5cd86e..853c5ea 100644
--- a/net/sched/em_text.c
+++ b/net/sched/em_text.c
@@ -118,11 +118,14 @@ static int em_text_dump(struct sk_buff *skb, struct tcf_ematch *m)
    conf.pattern_len = textsearch_get_pattern_len(tm->config);
    conf.pad = 0;
 
-   RTA_PUT_NOHDR(skb, sizeof(conf), &conf);
-   RTA_APPEND(skb, conf.pattern_len, textsearch_get_pattern(tm->config));
+   if (nla_put_nohdr(skb, sizeof(conf), &conf) < 0)
+      goto nla_put_failure;
+   if (nla_append(skb, conf.pattern_len,
+             textsearch_get_pattern(tm->config)) < 0)
+      goto nla_put_failure;
    return 0;
 
-rtattr_failure:
+nla_put_failure:
    return -1;
 }
 


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.