Re: NetFilter: portability fixes

From: Russell King (rmk@arm.linux.org.uk)
Date: Fri Jun 02 2000 - 01:20:05 EST


Rusty Russell writes:
> Does it actually fix anything? Or just save 2 bytes on ARM?

Oh yes. I thought you read the netfilter mailing list? I posted a
full explaination there for the change.

> If you want to be pedantic, I would prefer changing the memcmps to
> something like:

It's nothing about pedantic. It's about structure sizing and alignment
assumptions that the netfilter code makes which ARE JUST WRONG for
portable code. You can not predict what the structure layout will be
for each architecture. The only thing that is guaranteed is the order
of the elements.

> Prefer that approach?

If you prefer that approach, then use that. Either fixes the problem.
   _____
  |_____| ------------------------------------------------- ---+---+-
  | | Russell King rmk@arm.linux.org.uk --- ---
  | | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
  | +-+-+ --- -+-
  / | THE developer of ARM Linux |+| /|\
 / | | | --- |
    +-+-+ ------------------------------------------------- /\\\ |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:14 EST