{"action":"opened","number":11,"pull_request":{"url":"https://api.github.com/repos/SnabbDDoS/snabb/pulls/11","id":67472773,"html_url":"https://github.com/SnabbDDoS/snabb/pull/11","diff_url":"https://github.com/SnabbDDoS/snabb/pull/11.diff","patch_url":"https://github.com/SnabbDDoS/snabb/pull/11.patch","issue_url":"https://api.github.com/repos/SnabbDDoS/snabb/issues/11","number":11,"state":"open","locked":false,"title":"Add basic packet validity checks","user":{"login":"plajjan","id":841628,"avatar_url":"https://avatars.githubusercontent.com/u/841628?v=3","gravatar_id":"","url":"https://api.github.com/users/plajjan","html_url":"https://github.com/plajjan","followers_url":"https://api.github.com/users/plajjan/followers","following_url":"https://api.github.com/users/plajjan/following{/other_user}","gists_url":"https://api.github.com/users/plajjan/gists{/gist_id}","starred_url":"https://api.github.com/users/plajjan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plajjan/subscriptions","organizations_url":"https://api.github.com/users/plajjan/orgs","repos_url":"https://api.github.com/users/plajjan/repos","events_url":"https://api.github.com/users/plajjan/events{/privacy}","received_events_url":"https://api.github.com/users/plajjan/received_events","type":"User","site_admin":false},"body":"We check that the IP version, as read from the IP header, is 4. Since we\r\nonly support IPv4 right now, we simply throw away packets with other\r\nvalues since that means they are invalid. Note that before this we\r\nalready check the ethertype and forward packets that have an ethertype\r\nindicating something else than IPv4, so this check really only makes\r\nsure that the IP version as read from IP header is same as advertised in\r\nthe ethertype.\r\n\r\nThe second check looks at the packet length and makes sure it is what\r\nit's supposed to be. It only does the comparison for packets longer than\r\n60 bytes since shorter packets are padded and we have no real way of\r\nvalidity checking that.","created_at":"2016-04-22T07:58:49Z","updated_at":"2016-04-22T07:58:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"plajjan","id":841628,"avatar_url":"https://avatars.githubusercontent.com/u/841628?v=3","gravatar_id":"","url":"https://api.github.com/users/plajjan","html_url":"https://github.com/plajjan","followers_url":"https://api.github.com/users/plajjan/followers","following_url":"https://api.github.com/users/plajjan/following{/other_user}","gists_url":"https://api.github.com/users/plajjan/gists{/gist_id}","starred_url":"https://api.github.com/users/plajjan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plajjan/subscriptions","organizations_url":"https://api.github.com/users/plajjan/orgs","repos_url":"https://api.github.com/users/plajjan/repos","events_url":"https://api.github.com/users/plajjan/events{/privacy}","received_events_url":"https://api.github.com/users/plajjan/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/SnabbDDoS/snabb/pulls/11/commits","review_comments_url":"https://api.github.com/repos/SnabbDDoS/snabb/pulls/11/comments","review_comment_url":"https://api.github.com/repos/SnabbDDoS/snabb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SnabbDDoS/snabb/issues/11/comments","statuses_url":"https://api.github.com/repos/SnabbDDoS/snabb/statuses/1cc34ac3956b31379fb3373b7fca71df7ddec7c3","head":{"label":"plajjan:invalid-packet-checks","ref":"invalid-packet-checks","sha":"1cc34ac3956b31379fb3373b7fca71df7ddec7c3","user":{"login":"plajjan","id":841628,"avatar_url":"https://avatars.githubusercontent.com/u/841628?v=3","gravatar_id":"","url":"https://api.github.com/users/plajjan","html_url":"https://github.com/plajjan","followers_url":"https://api.github.com/users/plajjan/followers","following_url":"https://api.github.com/users/plajjan/following{/other_user}","gists_url":"https://api.github.com/users/plajjan/gists{/gist_id}","starred_url":"https://api.github.com/users/plajjan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plajjan/subscriptions","organizations_url":"https://api.github.com/users/plajjan/orgs","repos_url":"https://api.github.com/users/plajjan/repos","events_url":"https://api.github.com/users/plajjan/events{/privacy}","received_events_url":"https://api.github.com/users/plajjan/received_events","type":"User","site_admin":false},"repo":{"id":27101480,"name":"snabbswitch","full_name":"plajjan/snabbswitch","owner":{"login":"plajjan","id":841628,"avatar_url":"https://avatars.githubusercontent.com/u/841628?v=3","gravatar_id":"","url":"https://api.github.com/users/plajjan","html_url":"https://github.com/plajjan","followers_url":"https://api.github.com/users/plajjan/followers","following_url":"https://api.github.com/users/plajjan/following{/other_user}","gists_url":"https://api.github.com/users/plajjan/gists{/gist_id}","starred_url":"https://api.github.com/users/plajjan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plajjan/subscriptions","organizations_url":"https://api.github.com/users/plajjan/orgs","repos_url":"https://api.github.com/users/plajjan/repos","events_url":"https://api.github.com/users/plajjan/events{/privacy}","received_events_url":"https://api.github.com/users/plajjan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/plajjan/snabbswitch","description":"Snabb Switch: Fast open source packet processing","fork":true,"url":"https://api.github.com/repos/plajjan/snabbswitch","forks_url":"https://api.github.com/repos/plajjan/snabbswitch/forks","keys_url":"https://api.github.com/repos/plajjan/snabbswitch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plajjan/snabbswitch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plajjan/snabbswitch/teams","hooks_url":"https://api.github.com/repos/plajjan/snabbswitch/hooks","issue_events_url":"https://api.github.com/repos/plajjan/snabbswitch/issues/events{/number}","events_url":"https://api.github.com/repos/plajjan/snabbswitch/events","assignees_url":"https://api.github.com/repos/plajjan/snabbswitch/assignees{/user}","branches_url":"https://api.github.com/repos/plajjan/snabbswitch/branches{/branch}","tags_url":"https://api.github.com/repos/plajjan/snabbswitch/tags","blobs_url":"https://api.github.com/repos/plajjan/snabbswitch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plajjan/snabbswitch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plajjan/snabbswitch/git/refs{/sha}","trees_url":"https://api.github.com/repos/plajjan/snabbswitch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plajjan/snabbswitch/statuses/{sha}","languages_url":"https://api.github.com/repos/plajjan/snabbswitch/languages","stargazers_url":"https://api.github.com/repos/plajjan/snabbswitch/stargazers","contributors_url":"https://api.github.com/repos/plajjan/snabbswitch/contributors","subscribers_url":"https://api.github.com/repos/plajjan/snabbswitch/subscribers","subscription_url":"https://api.github.com/repos/plajjan/snabbswitch/subscription","commits_url":"https://api.github.com/repos/plajjan/snabbswitch/commits{/sha}","git_commits_url":"https://api.github.com/repos/plajjan/snabbswitch/git/commits{/sha}","comments_url":"https://api.github.com/repos/plajjan/snabbswitch/comments{/number}","issue_comment_url":"https://api.github.com/repos/plajjan/snabbswitch/issues/comments{/number}","contents_url":"https://api.github.com/repos/plajjan/snabbswitch/contents/{+path}","compare_url":"https://api.github.com/repos/plajjan/snabbswitch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plajjan/snabbswitch/merges","archive_url":"https://api.github.com/repos/plajjan/snabbswitch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plajjan/snabbswitch/downloads","issues_url":"https://api.github.com/repos/plajjan/snabbswitch/issues{/number}","pulls_url":"https://api.github.com/repos/plajjan/snabbswitch/pulls{/number}","milestones_url":"https://api.github.com/repos/plajjan/snabbswitch/milestones{/number}","notifications_url":"https://api.github.com/repos/plajjan/snabbswitch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plajjan/snabbswitch/labels{/name}","releases_url":"https://api.github.com/repos/plajjan/snabbswitch/releases{/id}","deployments_url":"https://api.github.com/repos/plajjan/snabbswitch/deployments","created_at":"2014-11-25T00:19:36Z","updated_at":"2016-04-04T14:31:07Z","pushed_at":"2016-04-22T07:58:34Z","git_url":"git://github.com/plajjan/snabbswitch.git","ssh_url":"git@github.com:plajjan/snabbswitch.git","clone_url":"https://github.com/plajjan/snabbswitch.git","svn_url":"https://github.com/plajjan/snabbswitch","homepage":"","size":6444,"stargazers_count":7,"watchers_count":7,"language":"Lua","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":7,"default_branch":"snabbddos"}},"base":{"label":"SnabbDDoS:snabbddos","ref":"snabbddos","sha":"f95467669125276c0812724f2103c21f5afb904b","user":{"login":"SnabbDDoS","id":18415467,"avatar_url":"https://avatars.githubusercontent.com/u/18415467?v=3","gravatar_id":"","url":"https://api.github.com/users/SnabbDDoS","html_url":"https://github.com/SnabbDDoS","followers_url":"https://api.github.com/users/SnabbDDoS/followers","following_url":"https://api.github.com/users/SnabbDDoS/following{/other_user}","gists_url":"https://api.github.com/users/SnabbDDoS/gists{/gist_id}","starred_url":"https://api.github.com/users/SnabbDDoS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SnabbDDoS/subscriptions","organizations_url":"https://api.github.com/users/SnabbDDoS/orgs","repos_url":"https://api.github.com/users/SnabbDDoS/repos","events_url":"https://api.github.com/users/SnabbDDoS/events{/privacy}","received_events_url":"https://api.github.com/users/SnabbDDoS/received_events","type":"Organization","site_admin":false},"repo":{"id":56059510,"name":"snabb","full_name":"SnabbDDoS/snabb","owner":{"login":"SnabbDDoS","id":18415467,"avatar_url":"https://avatars.githubusercontent.com/u/18415467?v=3","gravatar_id":"","url":"https://api.github.com/users/SnabbDDoS","html_url":"https://github.com/SnabbDDoS","followers_url":"https://api.github.com/users/SnabbDDoS/followers","following_url":"https://api.github.com/users/SnabbDDoS/following{/other_user}","gists_url":"https://api.github.com/users/SnabbDDoS/gists{/gist_id}","starred_url":"https://api.github.com/users/SnabbDDoS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SnabbDDoS/subscriptions","organizations_url":"https://api.github.com/users/SnabbDDoS/orgs","repos_url":"https://api.github.com/users/SnabbDDoS/repos","events_url":"https://api.github.com/users/SnabbDDoS/events{/privacy}","received_events_url":"https://api.github.com/users/SnabbDDoS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SnabbDDoS/snabb","description":"Snabb: Simple and fast packet networking","fork":true,"url":"https://api.github.com/repos/SnabbDDoS/snabb","forks_url":"https://api.github.com/repos/SnabbDDoS/snabb/forks","keys_url":"https://api.github.com/repos/SnabbDDoS/snabb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SnabbDDoS/snabb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SnabbDDoS/snabb/teams","hooks_url":"https://api.github.com/repos/SnabbDDoS/snabb/hooks","issue_events_url":"https://api.github.com/repos/SnabbDDoS/snabb/issues/events{/number}","events_url":"https://api.github.com/repos/SnabbDDoS/snabb/events","assignees_url":"https://api.github.com/repos/SnabbDDoS/snabb/assignees{/user}","branches_url":"https://api.github.com/repos/SnabbDDoS/snabb/branches{/branch}","tags_url":"https://api.github.com/repos/SnabbDDoS/snabb/tags","blobs_url":"https://api.github.com/repos/SnabbDDoS/snabb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SnabbDDoS/snabb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SnabbDDoS/snabb/git/refs{/sha}","trees_url":"https://api.github.com/repos/SnabbDDoS/snabb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SnabbDDoS/snabb/statuses/{sha}","languages_url":"https://api.github.com/repos/SnabbDDoS/snabb/languages","stargazers_url":"https://api.github.com/repos/SnabbDDoS/snabb/stargazers","contributors_url":"https://api.github.com/repos/SnabbDDoS/snabb/contributors","subscribers_url":"https://api.github.com/repos/SnabbDDoS/snabb/subscribers","subscription_url":"https://api.github.com/repos/SnabbDDoS/snabb/subscription","commits_url":"https://api.github.com/repos/SnabbDDoS/snabb/commits{/sha}","git_commits_url":"https://api.github.com/repos/SnabbDDoS/snabb/git/commits{/sha}","comments_url":"https://api.github.com/repos/SnabbDDoS/snabb/comments{/number}","issue_comment_url":"https://api.github.com/repos/SnabbDDoS/snabb/issues/comments{/number}","contents_url":"https://api.github.com/repos/SnabbDDoS/snabb/contents/{+path}","compare_url":"https://api.github.com/repos/SnabbDDoS/snabb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SnabbDDoS/snabb/merges","archive_url":"https://api.github.com/repos/SnabbDDoS/snabb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SnabbDDoS/snabb/downloads","issues_url":"https://api.github.com/repos/SnabbDDoS/snabb/issues{/number}","pulls_url":"https://api.github.com/repos/SnabbDDoS/snabb/pulls{/number}","milestones_url":"https://api.github.com/repos/SnabbDDoS/snabb/milestones{/number}","notifications_url":"https://api.github.com/repos/SnabbDDoS/snabb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SnabbDDoS/snabb/labels{/name}","releases_url":"https://api.github.com/repos/SnabbDDoS/snabb/releases{/id}","deployments_url":"https://api.github.com/repos/SnabbDDoS/snabb/deployments","created_at":"2016-04-12T12:04:52Z","updated_at":"2016-04-21T13:38:02Z","pushed_at":"2016-04-22T07:53:35Z","git_url":"git://github.com/SnabbDDoS/snabb.git","ssh_url":"git@github.com:SnabbDDoS/snabb.git","clone_url":"https://github.com/SnabbDDoS/snabb.git","svn_url":"https://github.com/SnabbDDoS/snabb","homepage":"","size":6514,"stargazers_count":2,"watchers_count":2,"language":"Lua","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":2,"default_branch":"snabbddos"}},"_links":{"self":{"href":"https://api.github.com/repos/SnabbDDoS/snabb/pulls/11"},"html":{"href":"https://github.com/SnabbDDoS/snabb/pull/11"},"issue":{"href":"https://api.github.com/repos/SnabbDDoS/snabb/issues/11"},"comments":{"href":"https://api.github.com/repos/SnabbDDoS/snabb/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/SnabbDDoS/snabb/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/SnabbDDoS/snabb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SnabbDDoS/snabb/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/SnabbDDoS/snabb/statuses/1cc34ac3956b31379fb3373b7fca71df7ddec7c3"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":32,"deletions":0,"changed_files":1}}