Skip to content

Proposal of fix for kernel segfault #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix segfault
  • Loading branch information
helloIAmPau committed Jan 14, 2015
commit 08250c89fe9f55d0f347f0bd6f9723cf9f08766b
3 changes: 3 additions & 0 deletions pipework
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ else
}
fi

# This avoids segfault when pipework is called twice on the same container for the same interface
[ -L /sys/class/net/${IFNAME}/upper_ph${NSPID}${CONTAINER_IFNAME} ] && echo "A bridge to ${CONTAINER_IFNAME} already exists for container ${GUESTNAME}" && echo $(ls /sys/class/net/${IFNAME}/upper_ph${NSPID}* | sed "s/\/sys\/class\/net\/${IFNAME}\/upper_ph${NSPID}//g") && echo "are already taken" && exit 1

# Check if an incompatible VLAN device already exists
[ $IFTYPE = phys ] && [ "$VLAN" ] && [ -d /sys/class/net/$IFNAME.VLAN ] && {
[ -z "$(ip -d link show $IFNAME.$VLAN | grep "vlan.*id $VLAN")" ] && {
Expand Down