git: udp: Fix IP source address setting for multicast address bound socket (2)

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Wed May 22 22:39:52 PDT 2013


commit 834fa505fcff22e773a50f6d305430b2535cafd2
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Thu May 23 13:35:07 2013 +0800

    udp: Fix IP source address setting for multicast address bound socket (2)
    
    Source address should _not_ be set to INADDR_ANY in udp_output(), which
    will make udp_output() calculate wrong pseudo header checksum.  Instead
    of letting IP to select the source address, we extend in_pcbladdr() to
    always locate the laddr, and use this function to find the source address
    in udp_output().

Summary of changes:
 sys/netinet/in_pcb.c     | 14 +++++++++++---
 sys/netinet/in_pcb.h     |  2 ++
 sys/netinet/udp_usrreq.c | 11 +++++------
 3 files changed, 18 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/834fa505fcff22e773a50f6d305430b2535cafd2


-- 
DragonFly BSD source repository


More information about the Commits mailing list