diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2003-07-23 21:07:04 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2003-07-23 21:07:04 +0000 |
commit | f81c270327779cfeba3fef74705e6d89c7e7683e (patch) | |
tree | d12dc881c7f597df47779922ee32bd7604e9fb1c /ebtables.c | |
parent | a5dde3b873f1958339440fcf5937fdd5ff89da4c (diff) | |
download | ebtables-f81c270327779cfeba3fef74705e6d89c7e7683e.tar.gz |
support sparc64
Diffstat (limited to 'ebtables.c')
-rw-r--r-- | ebtables.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -309,14 +309,14 @@ merge_options(struct option *oldopts, const struct option *newopts, void register_match(struct ebt_u_match *m) { - int size = m->size + sizeof(struct ebt_entry_match); + int size = EBT_ALIGN(m->size) + sizeof(struct ebt_entry_match); struct ebt_u_match **i; m->m = (struct ebt_entry_match *)malloc(size); if (!m->m) print_memory(); strcpy(m->m->u.name, m->name); - m->m->match_size = m->size; + m->m->match_size = EBT_ALIGN(m->size); ebt_options = merge_options (ebt_options, m->extra_ops, &(m->option_offset)); m->init(m->m); @@ -328,14 +328,14 @@ void register_match(struct ebt_u_match *m) void register_watcher(struct ebt_u_watcher *w) { - int size = w->size + sizeof(struct ebt_entry_watcher); + int size = EBT_ALIGN(w->size) + sizeof(struct ebt_entry_watcher); struct ebt_u_watcher **i; w->w = (struct ebt_entry_watcher *)malloc(size); if (!w->w) print_memory(); strcpy(w->w->u.name, w->name); - w->w->watcher_size = w->size; + w->w->watcher_size = EBT_ALIGN(w->size); ebt_options = merge_options (ebt_options, w->extra_ops, &(w->option_offset)); w->init(w->w); @@ -347,14 +347,14 @@ void register_watcher(struct ebt_u_watcher *w) void register_target(struct ebt_u_target *t) { - int size = t->size + sizeof(struct ebt_entry_target); + int size = EBT_ALIGN(t->size) + sizeof(struct ebt_entry_target); struct ebt_u_target **i; t->t = (struct ebt_entry_target *)malloc(size); if (!t->t) print_memory(); strcpy(t->t->u.name, t->name); - t->t->target_size = t->size; + t->t->target_size = EBT_ALIGN(t->size); ebt_options = merge_options (ebt_options, t->extra_ops, &(t->option_offset)); t->init(t->t); |