Advertisement
upyzl

New RA option for kernel (test)

May 11th, 2012
758
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.15 KB | None | 0 0
  1. From 24edc4a0bb7b51ace327a662ca6ad4e6d250464f Mon Sep 17 00:00:00 2001
  2. From: zhj <zj262144@163.com>
  3. Date: Fri, 11 May 2012 13:49:06 +0800
  4. Subject: [PATCH] Add process new option (Part 1)
  5.  
  6. ---
  7.  include/net/ndisc.h |    1 +
  8.  net/ipv6/ndisc.c    |    3 +++
  9.  2 files changed, 4 insertions(+), 0 deletions(-)
  10.  
  11. diff --git a/include/net/ndisc.h b/include/net/ndisc.h
  12. index f76f22d..724a481 100644
  13. --- a/include/net/ndisc.h
  14. +++ b/include/net/ndisc.h
  15. @@ -34,6 +34,7 @@ enum {
  16.     __ND_OPT_ARRAY_MAX,
  17.     ND_OPT_ROUTE_INFO = 24,     /* RFC4191 */
  18.     ND_OPT_RDNSS = 25,      /* RFC5006 */
  19. +   ND_OPT_TELE = 200,      /* Custom */       
  20.     __ND_OPT_MAX
  21.  };
  22.  
  23. diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
  24. index 2efef52..94d93b3 100644
  25. --- a/net/ipv6/ndisc.c
  26. +++ b/net/ipv6/ndisc.c
  27. @@ -281,6 +281,9 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len,
  28.             if (!ndopts->nd_opt_array[nd_opt->nd_opt_type])
  29.                 ndopts->nd_opt_array[nd_opt->nd_opt_type] = nd_opt;
  30.             break;
  31. +       case ND_OPT_TELE:
  32. +           ndopts->nd_opts_ri_end = nd_opt;
  33. +           break;
  34.  #ifdef CONFIG_IPV6_ROUTE_INFO
  35.         case ND_OPT_ROUTE_INFO:
  36.             ndopts->nd_opts_ri_end = nd_opt;
  37. --
  38. 1.7.9.msysgit.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement