Bug 201382 - net/dhcprelay: Does not work on big-endian machines
Summary: net/dhcprelay: Does not work on big-endian machines
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: mips Any
: --- Affects Some People
Assignee: Thomas Zander
URL:
Keywords: easy, patch, patch-ready
Depends on:
Blocks:
 
Reported: 2015-07-06 21:13 UTC by Kristof Provost
Modified: 2015-07-26 12:14 UTC (History)
5 users (show)

See Also:
edwin: maintainer-feedback+


Attachments
dhcprelay patch (317 bytes, patch)
2015-07-06 21:13 UTC, Kristof Provost
koobs: maintainer-approval? (edwin)
Details | Diff
Cross-build output (3.07 KB, text/plain)
2015-07-07 08:26 UTC, Kristof Provost
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kristof Provost freebsd_committer freebsd_triage 2015-07-06 21:13:45 UTC
Created attachment 158434 [details]
dhcprelay patch

net/dhcprelay doesn't work on big-endian machines.

In pcap_callback() it checks if the received ethernet frame contains an IP packet as follows: "eh->ether_type!=8". That's correct on a little-endian system, but not on a big-endian one.

The attached patch fixes the issue.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2015-07-07 04:44:54 UTC
Thanks Kristof,

Can you attach successful poudriere build output on mips please?
Comment 2 Kristof Provost freebsd_committer freebsd_triage 2015-07-07 08:26:10 UTC
Created attachment 158478 [details]
Cross-build output

Unfortunately I can't easily provide poudriere output. I'm cross-building because my target is a TPLink tl-wdr3600. It's only got 8MB of flash storage.

Here's the cross-build output though.
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-07-16 14:52:38 UTC
A commit references this bug:

Author: riggs
Date: Thu Jul 16 14:52:13 UTC 2015
New revision: 392296
URL: https://svnweb.freebsd.org/changeset/ports/392296

Log:
  Fix runtime error: Packet type identification on big-endian
  machines which prevented it from working correctly on e.g.
  MIPS-based routers.

  PR:		201382
  Submitted by:	kp@freebsd.org
  Approved by:	edwin@mavetju.org (maintainer)
  MFH:		2015Q3

Changes:
  head/net/dhcprelay/Makefile
  head/net/dhcprelay/files/patch-Makefile
  head/net/dhcprelay/files/patch-dhcprelay.c
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-07-17 16:09:32 UTC
A commit references this bug:

Author: riggs
Date: Fri Jul 17 16:09:20 UTC 2015
New revision: 392384
URL: https://svnweb.freebsd.org/changeset/ports/392384

Log:
  MFH: r392296

  Fix runtime error: Packet type identification on big-endian
  machines which prevented it from working correctly on e.g.
  MIPS-based routers.

  PR:		201382
  Submitted by:	kp@freebsd.org
  Approved by:	ports-secteam (feld), edwin@mavetju.org (maintainer)

Changes:
_U  branches/2015Q3/
  branches/2015Q3/net/dhcprelay/Makefile
  branches/2015Q3/net/dhcprelay/files/patch-Makefile
  branches/2015Q3/net/dhcprelay/files/patch-dhcprelay.c