git: DragonFly_RELEASE_6_4 ping(8): Fix pr_iph() to use ntohs() for ip_off field

Aaron LI aly at crater.dragonflybsd.org
Tue Mar 3 00:19:10 PST 2026


commit 0969469e7ba0af8952d1d52fd82fe5398b449cfe
Author: Aaron LI <aly at aaronly.me>
Date:   Tue Mar 3 15:50:51 2026 +0800

    ping(8): Fix pr_iph() to use ntohs() for ip_off field
    
    The ip_off (flags + fragment offset) is a 16-bit field, so we should use
    ntohs() instead of ntohl() to read it.
    
    See also: https://reviews.freebsd.org/D38479

Summary of changes:
 sbin/ping/ping.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0969469e7ba0af8952d1d52fd82fe5398b449cfe


-- 
DragonFly BSD source repository


More information about the Commits mailing list