title: Where do the Linux kernel router code replace the MAC address
body: <p>The router will replace the source MAC address of the package it received with the address of the previous hop and the destination MAC address with the address of next hop.</p>
  
  <p>The linux provides a functionality to worked as a router. My question is how the kernel code implement the function for mac address update during its package forwarding process? And where is this part of code</p>
  
  <p>I try to find the codes in /net/ipv4, but can not found anything...</p>