summaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .
AgeCommit message (Expand)Author
2016-10-31driver: tun: Use new macro SOCK_IOC_TYPE instead of literal number 0x89Gao Feng
2016-10-29driver: tun: Move tun check into the block of TUNSETIFF condition checkGao Feng
2016-10-20net: use core MTU range checking in core net infraJarod Wilson
2016-08-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
2016-08-23tun: fix transmit timestamp supportSoheil Hassas Yeganeh
2016-08-20tun: Rename a jump label in update_filter()Markus Elfring
2016-08-20tun: Use memdup_user() rather than duplicating its implementationMarkus Elfring
2016-07-08tun: Don't assume type tun in tun_device_eventCraig Gallek
2016-07-04tun: fix build warningsJason Wang
2016-07-01tun: switch to use skb array for txJason Wang
2016-06-15tun: fix csum generation for tap devicesPaolo Abeni
2016-06-10tuntap: use common code for virtio_net_hdr and skb GSO conversionMike Rapoport
2016-05-20tuntap: correctly wake up process during uninitJason Wang
2016-04-28tuntap: calculate rps hash only when neededJason Wang
2016-04-18tun: don't require serialization lock on txPaolo Abeni
2016-04-14tun: use per cpu variables for stats accountingPaolo Abeni
2016-04-09Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
2016-04-08tuntap: restore default qdiscJason Wang
2016-04-07tun: use socket locks for sk_{attach,detatch}_filterHannes Frederic Sowa
2016-04-04sock: enable timestamping using control messagesSoheil Hassas Yeganeh
2016-04-01tun, bpf: fix suspicious RCU usage in tun_{attach, detach}_filterDaniel Borkmann
2016-03-01net/tun: implement ndo_set_rx_headroomPaolo Abeni
2015-12-17tun: honor IFF_UP in tun_get_user()Eric Dumazet
2015-12-01net: rename SOCK_ASYNC_NOSPACE and SOCK_ASYNC_WAITDATAEric Dumazet
2015-10-12tun: use sk_fullsock() before reading sk->sk_tsflagsEric Dumazet
2015-08-03tuntap: Don't segment multiple tagged packets on tap deviceToshiaki Makita
2014-12-16tun: drop broken IFF_VNET_LEMichael S. Tsirkin
2014-12-11Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds
2014-12-11Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds
2014-12-09put iov_iter into msghdrAl Viro
2014-12-09tun: TUN_VNET_LE support, fix sparse warnings for virtio headersMichael S. Tsirkin
2014-12-09tun: drop most type definesMichael S. Tsirkin
2014-12-09tun: move internal flag defines out of uapiMichael S. Tsirkin
an class="p">, char **secret_access_key_p, char **stream_name_p) { char *access_key_id = *access_key_id_p; char *secret_access_key = *secret_access_key_p; char *stream_name = *stream_name_p; if(unlikely(access_key_id)) freez(access_key_id); if(unlikely(secret_access_key)) freez(secret_access_key); if(unlikely(stream_name)) freez(stream_name); access_key_id = NULL; secret_access_key = NULL; stream_name = NULL; int line = 0; char filename[FILENAME_MAX + 1]; snprintfz(filename, FILENAME_MAX, "%s/aws_kinesis.conf", path); char buffer[CONFIG_FILE_LINE_MAX + 1], *s; debug(D_BACKEND, "BACKEND: opening config file '%s'", filename); FILE *fp = fopen(filename, "r"); if(!fp) { return 1; } while(fgets(buffer, CONFIG_FILE_LINE_MAX, fp) != NULL) { buffer[CONFIG_FILE_LINE_MAX] = '\0'; line++; s = trim(buffer); if(!s || *s == '#') { debug(D_BACKEND, "BACKEND: ignoring line %d of file '%s', it is empty.", line, filename); continue; } char *name = s; char *value = strchr(s, '='); if(unlikely(!value)) { error("BACKEND: ignoring line %d ('%s') of file '%s', there is no = in it.", line, s, filename); continue; } *value = '\0'; value++; name = trim(name); value = trim(value); if(unlikely(!name || *name == '#')) { error("BACKEND: ignoring line %d of file '%s', name is empty.", line, filename); continue; } if(!value) value = ""; // strip quotes if(*value == '"' || *value == '\'') { value++; s = value; while(*s) s++; if(s != value) s--; if(*s == '"' || *s == '\'') *s = '\0'; } if(name[0] == 'a' && name[4] == 'a' && !strcmp(name, "aws_access_key_id")) { access_key_id = strdupz(value); } else if(name[0] == 'a' && name[4] == 's' && !strcmp(name, "aws_secret_access_key")) { secret_access_key = strdupz(value); } else if(name[0] == 's' && !strcmp(name, "stream name")) { stream_name = strdupz(value); } } fclose(fp); if(unlikely(!stream_name || !*stream_name)) { error("BACKEND: stream name is a mandatory Kinesis parameter but it is not configured"); return 1; } *access_key_id_p = access_key_id; *secret_access_key_p = secret_access_key; *stream_name_p = stream_name; return 0; }