Diff for /src/sys/netinet/if_ether.c between versions 1.11 and 1.12

version 1.11, 2004/04/09 22:34:10 version 1.12, 2004/04/21 18:13:56
Line 122  SYSCTL_INT(_net_link_ether_inet, OID_AUT Line 122  SYSCTL_INT(_net_link_ether_inet, OID_AUT
 static void     arp_rtrequest (int, struct rtentry *, struct rt_addrinfo *);  static void     arp_rtrequest (int, struct rtentry *, struct rt_addrinfo *);
 static void     arprequest (struct ifnet *,  static void     arprequest (struct ifnet *,
                         struct in_addr *, struct in_addr *, u_char *);                          struct in_addr *, struct in_addr *, u_char *);
static void        arpintr(struct netmsg *);static int        arpintr(struct netmsg *);
 static void     arptfree (struct llinfo_arp *);  static void     arptfree (struct llinfo_arp *);
 static void     arptimer (void *);  static void     arptimer (void *);
 static struct llinfo_arp  static struct llinfo_arp
Line 494  arpresolve(ifp, rt, m, dst, desten, rt0) Line 494  arpresolve(ifp, rt, m, dst, desten, rt0)
  * Common length and type checks are done here,   * Common length and type checks are done here,
  * then the protocol-specific routine is called.   * then the protocol-specific routine is called.
  */   */
static voidstatic int
 arpintr(struct netmsg *msg)  arpintr(struct netmsg *msg)
 {  {
         struct mbuf *m = ((struct netmsg_packet *)msg)->nm_packet;          struct mbuf *m = ((struct netmsg_packet *)msg)->nm_packet;
Line 504  arpintr(struct netmsg *msg) Line 504  arpintr(struct netmsg *msg)
         if (m->m_len < sizeof(struct arphdr) &&          if (m->m_len < sizeof(struct arphdr) &&
             ((m = m_pullup(m, sizeof(struct arphdr))) == NULL)) {              ((m = m_pullup(m, sizeof(struct arphdr))) == NULL)) {
                 log(LOG_ERR, "arp: runt packet -- m_pullup failed\n");                  log(LOG_ERR, "arp: runt packet -- m_pullup failed\n");
                return;                goto out2;
         }          }
         ar = mtod(m, struct arphdr *);          ar = mtod(m, struct arphdr *);
   
Line 515  arpintr(struct netmsg *msg) Line 515  arpintr(struct netmsg *msg)
                 log(LOG_ERR,                  log(LOG_ERR,
                     "arp: unknown hardware address format (0x%2D)\n",                      "arp: unknown hardware address format (0x%2D)\n",
                     (unsigned char *)&ar->ar_hrd, "");                      (unsigned char *)&ar->ar_hrd, "");
                m_freem(m);                goto out1;
                return; 
         }          }
   
         if (m->m_pkthdr.len < arphdr_len(ar) &&          if (m->m_pkthdr.len < arphdr_len(ar) &&
             (m = m_pullup(m, arphdr_len(ar))) == NULL) {              (m = m_pullup(m, arphdr_len(ar))) == NULL) {
                 log(LOG_ERR, "arp: runt packet\n");                  log(LOG_ERR, "arp: runt packet\n");
                m_freem(m);                goto out1;
                return; 
         }          }
   
         switch (ntohs(ar->ar_pro)) {          switch (ntohs(ar->ar_pro)) {
 #ifdef INET  #ifdef INET
                 case ETHERTYPE_IP:                  case ETHERTYPE_IP:
                         in_arpinput(m);                          in_arpinput(m);
                        return;                        goto out2;
 #endif  #endif
         }          }
   out1:
         m_freem(m);          m_freem(m);
   out2:
         lwkt_replymsg(&msg->nm_lmsg, 0);          lwkt_replymsg(&msg->nm_lmsg, 0);
           return(EASYNC);
 }  }
   
 #ifdef INET  #ifdef INET

Removed from v.1.11  
changed lines
  Added in v.1.12