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

Aaron LI aly at crater.dragonflybsd.org
Tue Mar 3 00:17:04 PST 2026


commit 6e99b78bb41e0723ac8b03335c9fcc79dd3c9fa6
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/6e99b78bb41e0723ac8b03335c9fcc79dd3c9fa6


-- 
DragonFly BSD source repository


More information about the Commits mailing list