Fix pppoe(4) with rdomain != 0

2014-08-13 Thread Martin Pieuchot
ok?

Index: net/if_pppoe.c
===
RCS file: /home/ncvs/src/sys/net/if_pppoe.c,v
retrieving revision 1.40
diff -u -p -r1.40 if_pppoe.c
--- net/if_pppoe.c  12 Jul 2014 18:44:22 -  1.40
+++ net/if_pppoe.c  13 Aug 2014 09:56:16 -
@@ -1398,6 +1398,9 @@ pppoe_send_padt(struct ifnet *outgoing_i
memcpy(eh-ether_dhost, dest, ETHER_ADDR_LEN);
 
m0-m_flags = ~(M_BCAST|M_MCAST);
+   /* encapsulated packet is forced into rdomain of physical interface */
+   m0-m_pkthdr.ph_rtableid = outgoing_if-if_rdomain;
+
return (outgoing_if-if_output(outgoing_if, m0, dst, NULL));
 }
 



Re: Fix pppoe(4) with rdomain != 0

2014-08-13 Thread Mike Belopuhov
OK

On 13 August 2014 11:56, Martin Pieuchot mpieuc...@nolizard.org wrote:
 ok?

 Index: net/if_pppoe.c
 ===
 RCS file: /home/ncvs/src/sys/net/if_pppoe.c,v
 retrieving revision 1.40
 diff -u -p -r1.40 if_pppoe.c
 --- net/if_pppoe.c  12 Jul 2014 18:44:22 -  1.40
 +++ net/if_pppoe.c  13 Aug 2014 09:56:16 -
 @@ -1398,6 +1398,9 @@ pppoe_send_padt(struct ifnet *outgoing_i
 memcpy(eh-ether_dhost, dest, ETHER_ADDR_LEN);

 m0-m_flags = ~(M_BCAST|M_MCAST);
 +   /* encapsulated packet is forced into rdomain of physical interface */
 +   m0-m_pkthdr.ph_rtableid = outgoing_if-if_rdomain;
 +
 return (outgoing_if-if_output(outgoing_if, m0, dst, NULL));
  }