Print this page
Mismerge datafilt.c
OS-4213 lxbrand should be able to set TCP_DEFER_ACCEPT after other socket operations

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/sockmods/datafilt.c
          +++ new/usr/src/uts/common/inet/sockmods/datafilt.c
↓ open down ↓ 77 lines elided ↑ open up ↑
  78   78          .sofop_attach_passive = dataf_attach_passive_cb,
  79   79          .sofop_detach = dataf_detach_cb,
  80   80          .sofop_data_in = dataf_data_in_cb
  81   81  };
  82   82  
  83   83  int
  84   84  _init(void)
  85   85  {
  86   86          int error;
  87   87  
  88      -        if ((error = sof_register(SOF_VERSION, DATAFILT_MODULE, &dataf_ops, 0))
  89      -            != 0)
       88 +        /*
       89 +         * This module is safe to attach even after some preliminary socket
       90 +         * setup calls have taken place. See the comment for SOF_ATT_SAFE.
       91 +         */
       92 +        error = sof_register(SOF_VERSION, DATAFILT_MODULE, &dataf_ops,
       93 +            SOF_ATT_SAFE);
       94 +        if (error != 0)
  90   95                  return (error);
  91   96          if ((error = mod_install(&dataf_modlinkage)) != 0)
  92   97                  (void) sof_unregister(DATAFILT_MODULE);
  93   98  
  94   99          return (error);
  95  100  }
  96  101  
  97  102  int
  98  103  _fini(void)
  99  104  {
↓ open down ↓ 13 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX