Initialize variable carp to avoid null dereference. Also do proper checking of correct interface name to avoid issues of strcmp