Skip to content

pcn-nat: fix natting-tables show#137

Merged
frisso merged 1 commit intomasterfrom
pr/fix_nat_session_table
Jun 4, 2019
Merged

pcn-nat: fix natting-tables show#137
frisso merged 1 commit intomasterfrom
pr/fix_nat_session_table

Conversation

@mbertrone
Copy link
Copy Markdown
Contributor

ensure st_k and st_v structs are aligned, using __attribute__((packed)).

@mbertrone mbertrone requested a review from a team as a code owner May 31, 2019 15:18
uint16_t dst_port;
uint8_t proto;
};
} __attribute__((packed));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matteo, can you please add a brief comment in the code stating why this attribute is needed?
E.g. /* attribute packet forces alignment for this structure; otherwise segmentation fault may happen when the userspace component tries to get access to that above data */

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, comments added.

@mbertrone mbertrone force-pushed the pr/fix_nat_session_table branch from cf5b2c5 to a5232a8 Compare May 31, 2019 17:16
@mbertrone
Copy link
Copy Markdown
Contributor Author

@mauriciovasquezbernal could you please check the machine is building docker images?
I'm able to build docker image locally. Thanks!

ensure st_k and st_v structs are aligned

Signed-off-by: Matteo Bertrone <m.bertrone@gmail.com>
Copy link
Copy Markdown
Contributor

@mauriciovasquezbernal mauriciovasquezbernal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it and it works fine.

@mbertrone I confirm there were some problems with the machine we use to build the docker image, I rebase to master and force pushed this branch, it should work.

@frisso frisso merged commit 8f0e9d1 into master Jun 4, 2019
@frisso frisso deleted the pr/fix_nat_session_table branch June 4, 2019 15:36
@acloudiator acloudiator removed the hold label Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants