Advertisement
Guest User

Untitled

a guest
Dec 9th, 2008
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. diff -u ipcp.c.orig ipcp.c
  2. --- ipcp.c.orig 2005-01-27 12:09:33.000000000 -0200
  3. +++ ipcp.c 2008-12-02 19:12:49.000000000 -0200
  4. @@ -690,7 +690,7 @@
  5. if (bundle->ncp.cfg.sendpipe > 0 || bundle->ncp.cfg.recvpipe > 0) {
  6. ncprange_getsa(&myrange, &ssgw, &ssmask);
  7. ncpaddr_getsa(&hisncpaddr, &ssdst);
  8. - rt_Update(bundle, sadst, sagw, samask);
  9. + rt_Update(bundle, sadst, sagw, samask, NULL, NULL);
  10. }
  11.  
  12. if (Enabled(bundle, OPT_SROUTES))
  13. diff -ur ipv6cp.c.orig ipv6cp.c
  14. --- ipv6cp.c.orig 2005-01-27 12:09:33.000000000 -0200
  15. +++ ipv6cp.c 2008-12-02 19:12:58.000000000 -0200
  16. @@ -245,7 +245,7 @@
  17. ncpaddr_getsa(&ipv6cp->hisaddr, &ssdst);
  18. else
  19. sadst = NULL;
  20. - rt_Update(bundle, sadst, sagw, samask);
  21. + rt_Update(bundle, sadst, sagw, samask, NULL, NULL);
  22. }
  23.  
  24. if (Enabled(bundle, OPT_SROUTES))
  25. diff -ur route.c.orig route.c
  26. --- route.c.orig 2005-01-10 09:12:36.000000000 -0200
  27. +++ route.c 2008-12-03 10:09:09.000000000 -0200
  28. @@ -524,7 +524,8 @@
  29. " mtu %lu\n", rtm->rtm_index, Index2Nam(rtm->rtm_index),
  30. ncprange_ntoa(&dst), bundle->iface->mtu);
  31. }
  32. - rt_Update(bundle, sa[RTAX_DST], sa[RTAX_GATEWAY], sa[RTAX_NETMASK]);
  33. + rt_Update(bundle, sa[RTAX_DST], sa[RTAX_GATEWAY], sa[RTAX_NETMASK],
  34. + sa[RTAX_IFP], sa[RTAX_IFA]);
  35. }
  36. }
  37.  
  38. @@ -862,7 +863,8 @@
  39.  
  40. void
  41. rt_Update(struct bundle *bundle, const struct sockaddr *dst,
  42. - const struct sockaddr *gw, const struct sockaddr *mask)
  43. + const struct sockaddr *gw, const struct sockaddr *mask,
  44. + const struct sockaddr *ifp, const struct sockaddr *ifa)
  45. {
  46. struct ncprange ncpdst;
  47. struct rtmsg rtmes;
  48. @@ -909,6 +911,13 @@
  49. p += memcpy_roundup(p, mask, mask->sa_len);
  50. }
  51.  
  52. + if (ifp && ifp->sa_family == AF_LINK && ifa) {
  53. + rtmes.m_rtm.rtm_addrs |= RTA_IFP;
  54. + p += memcpy_roundup(p, ifp, ifp->sa_len);
  55. + rtmes.m_rtm.rtm_addrs |= RTA_IFA;
  56. + p += memcpy_roundup(p, ifa, ifa->sa_len);
  57. + }
  58. +
  59. rtmes.m_rtm.rtm_msglen = p - (char *)&rtmes;
  60.  
  61. wb = ID0write(s, &rtmes, rtmes.m_rtm.rtm_msglen);
  62. diff -ur route.h.orig route.h
  63. --- route.h.orig 2001-08-15 23:01:05.000000000 -0300
  64. +++ route.h 2008-12-03 10:07:30.000000000 -0200
  65. @@ -70,4 +70,5 @@
  66. extern int rt_Set(struct bundle *, int, const struct ncprange *,
  67. const struct ncpaddr *, int, int);
  68. extern void rt_Update(struct bundle *, const struct sockaddr *,
  69. + const struct sockaddr *, const struct sockaddr *,
  70. const struct sockaddr *, const struct sockaddr *);
  71.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement