Changeset d4849a


Ignore:
Timestamp:
11/25/10 19:07:59 (18 months ago)
Author:
Laurent Ghigonis <laurent@…>
Branches:
master
Children:
66d942
Parents:
9c3343
git-author:
Laurent Ghigonis <laurent@…> (11/25/10 19:07:59)
git-committer:
Erik Ekman <erik@…> (02/04/12 20:34:05)
Message:

Add support for openbsd routing domain, #95

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r9c3343 rd4849a  
    3434        - Handle spaces when entering password interactively, fixes #93. 
    3535                Patch by Hagar. 
     36        - Add -R option to set OpenBSD routing domain for the DNS socket. 
     37                Patch by laurent at gouloum fr, fixes #95. 
    3638 
    37392009-06-01: 0.5.2 "WifiFree" 
  • man/iodine.8

    ra96e7d rd4849a  
    1818.B ] [-d 
    1919.I device 
     20.B ] [-R 
     21.I rdomain 
    2022.B ] [-m 
    2123.I fragsize 
     
    129131of the iodined host and test if it is reachable directly. If it is, traffic 
    130132will be sent to the server instead of the DNS relay. 
     133.TP 
     134.B -R rdomain 
     135Use OpenBSD routing domain 'rdomain' for the DNS connection. 
    131136.TP 
    132137.B -m fragsize 
  • src/iodine.c

    rb17790 rd4849a  
    137137        int selecttimeout; 
    138138        int hostname_maxlen; 
     139        int rtable = 0; 
    139140 
    140141        nameserv_addr = NULL; 
     
    175176#endif 
    176177 
    177         while ((choice = getopt(argc, argv, "vfhru:t:d:P:m:M:F:T:O:L:I:")) != -1) { 
     178        while ((choice = getopt(argc, argv, "vfhru:t:d:R:P:m:M:F:T:O:L:I:")) != -1) { 
    178179                switch(choice) { 
    179180                case 'v': 
     
    198199                case 'd': 
    199200                        device = optarg; 
     201                        break; 
     202                case 'R': 
     203                        rtable = atoi(optarg); 
    200204                        break; 
    201205                case 'P': 
     
    326330                goto cleanup2; 
    327331        } 
     332#ifdef OPENBSD 
     333        if (rtable > 0) 
     334                socket_setrtable(dns_fd, rtable); 
     335#endif 
    328336 
    329337        signal(SIGINT, sighandler); 
  • src/util.c

    r2c2dd6 rd4849a  
    6868} 
    6969 
     70#ifdef OPENBSD 
     71void 
     72socket_setrtable(int fd, int rtable) 
     73{ 
     74        if (setsockopt (fd, IPPROTO_IP, SO_RTABLE, &rtable, sizeof(rtable)) == -1) 
     75            err(1, "Failed to set routing table %d", rtable); 
     76} 
     77#endif 
  • src/util.h

    r27fdc2 rd4849a  
    33 
    44char *get_resolvconf_addr(); 
     5void socket_setrtable(int fd, int rtable); 
    56 
    67#endif 
Note: See TracChangeset for help on using the changeset viewer.